Dear Tamaki
My config is: windows 10, CPU (no GPU), Python 3.6, while I run the program, I got the following error message. thank you for your help. Cheers.
Edward.
encoder.load_state_dict(torch.load(args.encoder_path))
File "D:\Dev\IDE\Anaconda35\lib\site-packages\torch\nn\modules\module.py", line 719, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for EncoderCNN:
Missing key(s) in state_dict: "vgg16_feat.0.weight", "vgg16_feat.0.bias", "vgg16_feat.2.weight", "vgg16_feat.2.bias", "vgg16_feat.5.weight", "vgg16_feat.5.bias", "vgg16_feat.7.weight", "vgg16_feat.7.bias", "vgg16_feat.10.weight", "vgg16_feat.10.bias", "vgg16_feat.12.weight", "vgg16_feat.12.bias",........"vgg16_clf.0.bias", "vgg16_clf.3.weight", "vgg16_clf.3.bias".
Unexpected key(s) in state_dict: "resnet.0.weight", "resnet.1.weight", "resnet.1.bias", "resnet.1.running_mean", "resnet.1.running_var", "resnet.4.0.conv1.weight", "resnet.4.0.bn1.weight", "resnet.4.0.bn1.bias", ........................... "resnet.7.2.bn3.running_mean", "resnet.7.2.bn3.running_var".
size mismatch for linear.weight: copying a param of torch.Size([256, 4096]) from checkpoint, where the shape is torch.Size([256, 2048]) in current model.