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
resnet50_v1c weight not match #21
Comments
Hi, thanks for your attention. I have checked the pre-trained model in Gluon. Now the pre-trained model in Gluon has changed some setting in the model. Therefore, if you have to use the converted model, you need to change the resnet code in the base_model folder correspondingly. Or I will publish the pre-trained model recently. |
when will you publish the pre-trained model ?and where can I download the resnet101_v1c.pth? |
i have the same problem ,if you have solved , can you tell me how to do ? |
you can find urls on the pyt_utils.py , |
I think the .pth in pyt_utils.py are original Resnet101's weight which is different with Resnet101_v1c. |
I have released the pre-trained models. |
Thanks to your great work!
I tried to run pspnet according to your instructions. I downloaded 'resnet50_v1c' from gluon and converted it to pytorch model by running 'python gluon2pytorch.py -m 'resnet50_v1c'. But when I tried to run the pspnet by command 'python train.py -d 0-7', it shows that the weight of the checkpoint does not match that of the current model. The log is as following:
RuntimeError: Error(s) in loading state_dict for ResNet:
size mismatch for conv1.0.weight: copying a param with shape torch.Size([32, 3, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 3, 3, 3]).
size mismatch for conv1.1.weight: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1.1.bias: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1.1.running_mean: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1.1.running_var: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1.3.weight: copying a param with shape torch.Size([32, 32, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 64, 3, 3]).
size mismatch for conv1.4.weight: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1.4.bias: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1.4.running_mean: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1.4.running_var: copying a param with shape torch.Size([32]) from checkpoint, the shape in current model is torch.Size([64]).
size mismatch for conv1.6.weight: copying a param with shape torch.Size([64, 32, 3, 3]) from checkpoint, the shape in current model is torch.Size([128, 64, 3, 3]).
size mismatch for bn1.weight: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for bn1.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for bn1.running_mean: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for bn1.running_var: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for layer1.0.conv1.weight: copying a param with shape torch.Size([64, 64, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 128, 1, 1]).
size mismatch for layer1.0.downsample.0.weight: copying a param with shape torch.Size([256, 64, 1, 1]) from checkpoint, the shape in current model is torch.Size([256, 128, 1, 1]).
Could you help me find out where it goes wrong? Thanks very much!
The text was updated successfully, but these errors were encountered: