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

Please help me! #33

Open
Deerzh opened this issue Aug 14, 2022 · 0 comments
Open

Please help me! #33

Deerzh opened this issue Aug 14, 2022 · 0 comments

Comments

@Deerzh
Copy link

Deerzh commented Aug 14, 2022

when I run test command:python test.py --loaddirec "./resultmodel.pth" --val_dataset "./dataset/test" --direc './special' --batch_size 1 --modelname "kiunet"
an error occurred:
Traceback (most recent call last):
File "test.py", line 127, in
model.load_state_dict(torch.load(loaddirec))
File "/home/zhang/anaconda3/envs/KiU/lib/python3.6/site-packages/torch/nn/modules/module.py", line 830, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for kiunet:
Missing key(s) in state_dict: "encoder1.weight", "encoder1.bias", "en1_bn.weight", "en1_bn.bias", "en1_bn.running_mean", "en1_bn.running_var", "encoder2.weight", "encoder2.bias", "en2_bn.weight", "en2_bn.bias", "en2_bn.running_mean", "en2_bn.running_var", "encoder3.weight", "encoder3.bias", "en3_bn.weight", "en3_bn.bias", "en3_bn.running_mean", "en3_bn.running_var", "decoder1.weight", "decoder1.bias", "de1_bn.we
.......

Can you help me solved this problem?

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