Open oxygen39 opened 4 years ago
Same problem here.
Anyone who solved it? I met this problem also, please help, thanks!
_NETS = {
"16": {"structure": [1, 1, 1, 1, 1, 1]},
"20": {"structure": [1, 1, 1, 3, 1, 1]},
"38": {"structure": [3, 3, 6, 3, 1, 1]},
}
__all__ = []
for name, params in _NETS.items():
net_name = "wider_resnet" + name
setattr(sys.modules[__name__], net_name, partial(WiderResNet, **params))
__all__.append(net_name)
for name, params in _NETS.items():
net_name = "wider_resnet" + name + "_a2"
setattr(sys.modules[__name__], net_name, partial(WiderResNetA2, **params))
__all__.append(net_name)
The module wider_resnet38_a2 is added by these codes in wider_resnet.py. If you encountered the problem "Cannot find reference 'wider_resnet38_a2' in 'wider_resnet.py' ", you can import WiderResNetA2 and initialize it like this:
from network.wider_resnet import WiderResNetA2
wide_resnet = WiderResNetA2(structure=[3, 3, 6, 3, 1, 1], classes=1000, dilation=True)
why I don't find the wider_resnet38_a2 ?