-
Notifications
You must be signed in to change notification settings - Fork 42
Description
当我执行detect.py时,出现如下错误。使用的是voc训练权重.。
`
Traceback (most recent call last):
File "detect.py", line 86, in
model.load_state_dict(torch.load("./checkpoint/model_1.pth",map_location=torch.device('cpu')), strict=True)
File "/home/zhangpan/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1052, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for DataParallel:
size mismatch for module.fcos_body.head.cls_logits.weight: copying a param with shape torch.Size([80, 256, 3, 3]) from checkpoint, the shape in current model is torch.Size([20, 256, 3, 3]).
size mismatch for module.fcos_body.head.cls_logits.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([20]).
`