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

During the test, it said that the shape of the model did not match. #12

Open
gaoda1024 opened this issue Jul 5, 2024 · 0 comments
Open

Comments

@gaoda1024
Copy link

--- load model ---
Traceback (most recent call last):
File "test.py", line 61, in
main()
File "test.py", line 29, in main
model.resume(opts.resume, train=False)
File "/home/gaoda/AutoColor/HistAuGAN/histaugan/model.py", line 444, in resume
self.enc_a.load_state_dict(checkpoint['enc_a'])
File "/home/gaoda/anaconda3/envs/HAG/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for MD_E_attr_concat:
size mismatch for conv.1.weight: copying a param with shape torch.Size([64, 12, 4, 4]) from checkpoint, the shape in current model is torch.Size([64, 6, 4, 4]).

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