KiU-Net-pytorch icon indicating copy to clipboard operation
KiU-Net-pytorch copied to clipboard

Please help me!

Open Deerzh opened this issue 1 year ago • 0 comments

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?

Deerzh avatar Aug 14 '22 02:08 Deerzh