New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load pretrain model issue #29
Comments
I guess so. Maybe you can try pytorch>1.0, those models are not trained with pytorch0.4.1. |
If the problem still exists, please let me know. |
I use pytorch 1.4.0 and the problem still exists. |
Do you use the res2net_v1b.py file? Or do you add res2net to your existing model? The downsample module in res2netv1b is silightly differenet from res2netv1 and resnet. |
I did not use the res2net_v1b.py file, that's the problem. |
RuntimeError: Error(s) in loading state_dict for Res2Net:
size mismatch for layer1.0.downsample.1.weight: copying a param of torch.Size([256]) from checkpoint, where the shape is torch.Size([256, 64, 1, 1]) in current model.
size mismatch for layer2.0.downsample.1.weight: copying a param of torch.Size([512]) from checkpoint, where the shape is torch.Size([512, 256, 1, 1]) in current model.
size mismatch for layer3.0.downsample.1.weight: copying a param of torch.Size([1024]) from checkpoint, where the shape is torch.Size([1024, 512, 1, 1]) in current model.
when i load res2net50_v1b.pth, i meet this problem, but i can load res2net50_26w_4s.pth pretrain model to train my network.
i guess there is a problem between pytorch version?
pytorch: 0.4.1;
torchvision: 0.2.1
python: 3.6
The text was updated successfully, but these errors were encountered: