You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def resnext50(baseWidth, cardinality,pretrained=True):
"""
Construct ResNeXt-50.
"""
model = ResNeXt(baseWidth, cardinality, [3, 4, 6, 3], 1000)
if pretrained:
model.load_state_dict(torch.load('model_best.pth.tar')['state_dict'])
print('loaded model')
return model
the model_best.pth.tar file download from the link of readme.md
and some errors raised when i run:
Traceback (most recent call last):
File "imagenet.py", line 348, in <module>
main()
File "imagenet.py", line 152, in main
cardinality=args.cardinality,
File "/media/amax/xgessd/yao/pytorch-classification/models/imagenet/resnext.py", line 160, in resnext50
model.load_state_dict(torch.load('ResNext50_checkpoint_best.pth.tar')['state_dict'])
File "/home/amax/anaconda3/lib/python3.6/site-packages/torch/nn/modules/module.py", line 721, in load_state_dict
self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for ResNeXt:
Missing key(s) in state_dict: "conv1.weight", "bn1.weight", "bn1.bias", "bn1.running_mean", "bn1.running_var", "lay........
The text was updated successfully, but these errors were encountered:
i try to modify resnext50 function to:
the model_best.pth.tar file download from the link of readme.md
and some errors raised when i run:
The text was updated successfully, but these errors were encountered: