Traceback (most recent call last):
File "D:/PythonStudySpace/yolov4-pytorch-master/yolov4-pytorch-master/predict.py", line 7, in <module>
yolo = YOLO()
File "D:\PythonStudySpace\yolov4-pytorch-master\yolov4-pytorch-master\yolo.py", line 45, in __init__
self.generate()
File "D:\PythonStudySpace\yolov4-pytorch-master\yolov4-pytorch-master\yolo.py", line 77, in generate
self.net.load_state_dict(state_dict)
File "D:\ProgramData\Anaconda3\envs\pytorch\lib\site-packages\torch\nn\modules\module.py", line 845, in load_state_dict
self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for YoloBody:
size mismatch for yolo_head3.1.weight: copying a param with shape torch.Size([75, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([27, 256, 1, 1]).
size mismatch for yolo_head3.1.bias: copying a param with shape torch.Size([75]) from checkpoint, the shape in current model is torch.Size([27]).
size mismatch for yolo_head2.1.weight: copying a param with shape torch.Size([75, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([27, 512, 1, 1]).
size mismatch for yolo_head2.1.bias: copying a param with shape torch.Size([75]) from checkpoint, the shape in current model is torch.Size([27]).
size mismatch for yolo_head1.1.weight: copying a param with shape torch.Size([75, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([27, 1024, 1, 1]).
size mismatch for yolo_head1.1.bias: copying a param with shape torch.Size([75]) from checkpoint, the shape in current model is torch.Size([27]).