Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

这是怎么处理的? #165

Open
Shajiu opened this issue Nov 24, 2021 · 0 comments
Open

这是怎么处理的? #165

Shajiu opened this issue Nov 24, 2021 · 0 comments

Comments

@Shajiu
Copy link

Shajiu commented Nov 24, 2021

Traceback (most recent call last):
File "demo.py", line 59, in
demo(args)
File "demo.py", line 45, in demo
model = get_model(args.model, local_rank=args.local_rank, pretrained=True, root=args.save_folder).to(device)
File "E:\Python_Projects\awesome-semantic-segmentation-pytorch-master\core\models\model_zoo.py", line 83, in get_model
net = _modelsname
File "E:\Python_Projects\awesome-semantic-segmentation-pytorch-master\core\models\fcn.py", line 219, in get_fcn32s_vgg16_voc
return get_fcn32s('pascal_voc', 'vgg16', **kwargs)
File "E:\Python_Projects\awesome-semantic-segmentation-pytorch-master\core\models\fcn.py", line 172, in get_fcn32s
model.load_state_dict(torch.load("E:\fcn32s_vgg16_pascal_voc.pth",map_location="cpu"))
File "D:\Anaconda3\lib\site-packages\torch\nn\modules\module.py", line 1483, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for FCN32s:
Missing key(s) in state_dict: "pretrained.0.weight", "pretrained.0.bias", "pretrained.2.weight", "pretrained.2.bias", "pretrained.5.weight", "pretrained.5.bias", "pretrained.7.weight", "pretrained.7.bias", "pretrained.10.weight", "pretrained.10.bias", "pretrained.12.weight", "pretrained.12.bias", "pretrained.14.weight", "pretrained.14.bias", "pretrained.17.weight", "pretrained.17.bias", "pretrained.19.weight", "pretrained.19.bias", "pretrained.21.weight", "pretrained.21.bias", "pretrained.24.weight", "pretrained.24.bias", "pretrained.26.weight", "pretrained.26.bias", "pretrained.28.weight", "pretrained.28.bias", "head.block.0.weight", "head.block.1.weight", "head.block.1.bias", "head.block.1.running_mean", "head.block.1.running_var", "head.block.4.weight", "head.block.4.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".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant