Skip to content
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

PreTrained model keys dismatch #7

Open
leonardozcm opened this issue Mar 24, 2022 · 1 comment
Open

PreTrained model keys dismatch #7

leonardozcm opened this issue Mar 24, 2022 · 1 comment

Comments

@leonardozcm
Copy link

Traceback (most recent call last):
  File "runner.py", line 130, in <module>
    CandiModel("PMPNet", loadParallelModel(PMPNet(),"checkpoint/pmpnet.pth") ),
  File "runner.py", line 39, in loadParallelModel
    print(model.load_state_dict(checkpoint[keyname]))
  File "/home/chriskafka/anaconda3/envs/ML/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1483, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
        size mismatch for module.step_1.sa_module_1.mlp_conv.0.conv.weight: copying a param with shape torch.Size([64, 9, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 6, 1, 1]).
        size mismatch for module.step_1.fp_module_1.mlp_conv.0.conv.weight: copying a param with shape torch.Size([128, 137, 1]) from checkpoint, the shape in current model is torch.Size([128, 134, 1]).

I only test pretrained-model of pcn, and turns out failure. Would you mind checking out if the model you provide on Google drive is right? thanks a lot.

@MatlabChen
Copy link

MatlabChen commented Oct 8, 2022

Same problem. You could use backup links to download the pre-trained model. That works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants