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

Using this code on my own dataset #24

Open
zhou-SHU164 opened this issue Apr 20, 2022 · 0 comments
Open

Using this code on my own dataset #24

zhou-SHU164 opened this issue Apr 20, 2022 · 0 comments

Comments

@zhou-SHU164
Copy link

when i finished the training process, and came to the test, the error occured:


File "test.py", line 127, in
test()
File "test.py", line 41, in test
net.module.load_state_dict(torch.load(args.load_model)['net_state_dict'], strict = False) #got the net parameters of checkpoint
File "/home/**/anaconda3/envs/VRC/lib/python3.7/site-packages/torch/nn/modules/module.py", line 845, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for Model:
size mismatch for decoder.encoder.sam_res1.conv1.weight: copying a param with shape torch.Size([64, 4, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 3, 1, 1]).
size mismatch for decoder.encoder.sam_res1.conv_res.weight: copying a param with shape torch.Size([64, 4, 1, 1]) from checkpoint, the shape in current model is torch.Size([64, 3, 1, 1]).


Maybe anyone could help 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

1 participant