HybridNets icon indicating copy to clipboard operation
HybridNets copied to clipboard

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

Open L1NINE opened this issue 1 year ago • 1 comments

(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 avatar Nov 14 '23 12:11 L1NINE

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

L1NINE avatar Nov 17 '23 12:11 L1NINE