Open i4yyds opened 5 years ago
Which the pytorch version and torchvision version you use? maybe you can use 链接: https://pan.baidu.com/s/1XbNjFJm5KmLJTFvU7uL4IQ 提取码: h3er this link to download vgg_weights
torch=0.4.1 torchvision=0.2.1 After using the pre-training VGG model you provided, the error was reported as follows:
Traceback (most recent call last):
File "F:/DSS-pytorch-master2/main.py", line 95, in
我这边Ubuntu下面没有这个问题。你看看是否是因为一些路径的问题呢?比如Line 32里面的路径在windows下应该为\而不是/
RuntimeError: Error(s) in loading state_dict for ModuleList: Missing key(s) in state_dict: "0.weight", "0.bias", "2.weight", "2.bias", "5.weight", "5.bias", "7.weight", "7.bias", "10.weight", "10.bias", "12.weight", "12.bias", "14.weight", "14.bias", "17.weight", "17.bias", "19.weight", "19.bias", "21.weight", "21.bias", "24.weight", "24.bias", "26.weight", "26.bias", "28.weight", "28.bias". Unexpected key(s) in state_dict: "features.0.weight", "features.0.bias", "features.2.weight", "features.2.bias", "features.5.weight", "features.5.bias", "features.7.weight", "features.7.bias", "features.10.weight", "features.10.bias", "features.12.weight", "features.12.bias", "features.14.weight", "features.14.bias", "features.17.weight", "features.17.bias", "features.19.weight", "features.19.bias", "features.21.weight", "features.21.bias", "features.24.weight", "features.24.bias", "features.26.weight", "features.26.bias", "features.28.weight", "features.28.bias", "classifier.0.weight", "classifier.0.bias", "classifier.3.weight", "classifier.3.bias", "classifier.6.weight", "classifier.6.bias".
could you help me ?thanks