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

I got errors when running hybridnets_test_videos.py after training with multiclass. #96

Open
L1NINE opened this issue Nov 14, 2023 · 1 comment

Comments

@L1NINE
Copy link

L1NINE commented Nov 14, 2023

(yolov5) D:\HybridNets-main2>python hybridnets_test.py -w checkpoints/PEOPLE/hybridnets-d3_0_35000.pth --source demo/image --output demo_result --imshow False --imwrite True
FOUND 6 IMAGES
DETECTED SEGMENTATION MODE FROM WEIGHT AND PROJECT FILE: multiclass
Traceback (most recent call last):
File "hybridnets_test.py", line 127, in
model.load_state_dict(weight)
File "F:\yolov5\Miniconda\envs\yolov5\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 HybridNetsBackbone:
size mismatch for classifier.header.pointwise_conv.conv.weight: copying a param with shape torch.Size([45, 160, 1, 1]) from checkpoint, the shape in current model is torch.Size([9, 160, 1, 1]).
size mismatch for classifier.header.pointwise_conv.conv.bias: copying a param with shape torch.Size([45]) from checkpoint, the shape in current model is torch.Size([9]).

My friends got the same errors.
Help me plz TT

@L1NINE
Copy link
Author

L1NINE commented Nov 17, 2023

I have resolved this error. The question came from my project.yml.

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