Randl / MobileNetV2-pytorch

Impementation of MobileNetV2 in pytorch
https://arxiv.org/abs/1801.04381
MIT License
270 stars 83 forks source link

AttributeError: 'ReLU6' object has no attribute 'dim' #1

Closed hhlgithub closed 6 years ago

hhlgithub commented 6 years ago

After I copy your codes and add my my test codes, as follows:

model = MobileNet2(in_channels=6,num_classes=100) print (model) x = torch.autograd.Variable(torch.randn(20, 6, 224, 224)) print (model(x))

I encounter such errors AttributeError: 'ReLU6' object has no attribute 'dim'

Randl commented 6 years ago

Thanks. Fixed in https://github.com/Randl/MobileNetV2-pytorch/commit/e77ad8a5db1db53bda2ede0b65574d249796bf4f