junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
22.8k stars 6.29k forks source link

RuntimeError: Error(s) in loading state_dict for ResnetGenerator #1474

Open fnurkinali opened 2 years ago

fnurkinali commented 2 years ago

Hello, I am trying to run test.py script but got this error. Can you help me to fix this?

Thank you!

RuntimeError: Error(s) in loading state_dict for ResnetGenerator: Missing key(s) in state_dict: "model.4.weight", "model.4.bias", "model.7.filt", "model.8.weight", "model.8.bias", "model.11.filt", "model.12.conv_block.1.weight", "model.12.conv_block.1.bias", "model.12.conv_block.5.weight", "model.12.conv_block.5.bias", "model.21.filt", "model.22.weight", "model.22.bias", "model.25.filt", "model.26.weight", "model.26.bias", "model.30.weight", "model.30.bias". Unexpected key(s) in state_dict: "SAB.conv1.weight", "SAB.conv2.weight", "SAB.conv3.weight", "model.4.conv1.weight", "model.4.conv2.weight", "model.4.conv3.weight", "model.5.weight", "model.5.bias", "model.8.filt", "model.9.weight", "model.9.bias", "model.12.filt", "model.21.conv_block.1.weight", "model.21.conv_block.1.bias", "model.21.conv_block.5.weight", "model.21.conv_block.5.bias", "model.22.filt", "model.23.weight", "model.23.bias", "model.26.filt", "model.27.weight", "model.27.bias", "model.31.weight", "model.31.bias".

junyanz commented 2 years ago

See this FAQ.