Load model.
Traceback (most recent call last):
File "get_map.py", line 92, in
yolo = YOLO(confidence = confidence, nms_iou = nms_iou)
File "/home/adrian/desktop/yolox-pytorch-main/yolo.py", line 85, in init
self.generate()
File "/home/adrian/desktop/yolox-pytorch-main/yolo.py", line 95, in generate
self.net.load_state_dict(torch.load(self.model_path, map_location=device))
File "/home/adrian/anaconda3/envs/pytorch/lib/python3.8/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 YoloBody:
size mismatch for head.cls_preds.0.weight: copying a param with shape torch.Size([12, 320, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 320, 1, 1]).
size mismatch for head.cls_preds.0.bias: copying a param with shape torch.Size([12]) from checkpoint, the shape in current model is torch.Size([80]).
size mismatch for head.cls_preds.1.weight: copying a param with shape torch.Size([12, 320, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 320, 1, 1]).
size mismatch for head.cls_preds.1.bias: copying a param with shape torch.Size([12]) from checkpoint, the shape in current model is torch.Size([80]).
size mismatch for head.cls_preds.2.weight: copying a param with shape torch.Size([12, 320, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 320, 1, 1]).
size mismatch for head.cls_preds.2.bias: copying a param with shape torch.Size([12]) from checkpoint, the shape in current model is torch.Size([80]).
Load model. Traceback (most recent call last): File "get_map.py", line 92, in
yolo = YOLO(confidence = confidence, nms_iou = nms_iou)
File "/home/adrian/desktop/yolox-pytorch-main/yolo.py", line 85, in init
self.generate()
File "/home/adrian/desktop/yolox-pytorch-main/yolo.py", line 95, in generate
self.net.load_state_dict(torch.load(self.model_path, map_location=device))
File "/home/adrian/anaconda3/envs/pytorch/lib/python3.8/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 YoloBody:
size mismatch for head.cls_preds.0.weight: copying a param with shape torch.Size([12, 320, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 320, 1, 1]).
size mismatch for head.cls_preds.0.bias: copying a param with shape torch.Size([12]) from checkpoint, the shape in current model is torch.Size([80]).
size mismatch for head.cls_preds.1.weight: copying a param with shape torch.Size([12, 320, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 320, 1, 1]).
size mismatch for head.cls_preds.1.bias: copying a param with shape torch.Size([12]) from checkpoint, the shape in current model is torch.Size([80]).
size mismatch for head.cls_preds.2.weight: copying a param with shape torch.Size([12, 320, 1, 1]) from checkpoint, the shape in current model is torch.Size([80, 320, 1, 1]).
size mismatch for head.cls_preds.2.bias: copying a param with shape torch.Size([12]) from checkpoint, the shape in current model is torch.Size([80]).