Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行SSD predict_test.py 出现出现错误 #839

Open
woshidamow5534 opened this issue Oct 8, 2024 · 0 comments
Open

运行SSD predict_test.py 出现出现错误 #839

woshidamow5534 opened this issue Oct 8, 2024 · 0 comments

Comments

@woshidamow5534
Copy link

Traceback (most recent call last):
File "F:\yolov8_change\deep-learning-for-image-processing-master\pytorch_object_detection\ssd\predict_test.py", line 98, in
main()
File "F:\yolov8_change\deep-learning-for-image-processing-master\pytorch_object_detection\ssd\predict_test.py", line 40, in main
model.load_state_dict(weights_dict,strict=False)
File "F:\DL\anaconda\anaconda3\Lib\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for SSD300:
size mismatch for conf.0.weight: copying a param with shape torch.Size([36, 1024, 3, 3]) from checkpoint, the shape in current model is torch.Size([84, 1024, 3, 3]).
size mismatch for conf.0.bias: copying a param with shape torch.Size([36]) from checkpoint, the shape in current model is torch.Size([84]).
size mismatch for conf.1.weight: copying a param with shape torch.Size([54, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([126, 512, 3, 3]).
size mismatch for conf.1.bias: copying a param with shape torch.Size([54]) from checkpoint, the shape in current model is torch.Size([126]).
size mismatch for conf.2.weight: copying a param with shape torch.Size([54, 512, 3, 3]) from checkpoint, the shape in current model is torch.Size([126, 512, 3, 3]).
size mismatch for conf.2.bias: copying a param with shape torch.Size([54]) from checkpoint, the shape in current model is torch.Size([126]).
size mismatch for conf.3.weight: copying a param with shape torch.Size([54, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([126, 256, 3, 3]).
size mismatch for conf.3.bias: copying a param with shape torch.Size([54]) from checkpoint, the shape in current model is torch.Size([126]).
size mismatch for conf.4.weight: copying a param with shape torch.Size([36, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([84, 256, 3, 3]).
size mismatch for conf.4.bias: copying a param with shape torch.Size([36]) from checkpoint, the shape in current model is torch.Size([84]).
size mismatch for conf.5.weight: copying a param with shape torch.Size([36, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([84, 256, 3, 3]).
size mismatch for conf.5.bias: copying a param with shape torch.Size([36]) from checkpoint, the shape in current model is torch.Size([84]).

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

No branches or pull requests

1 participant