-
Notifications
You must be signed in to change notification settings - Fork 42
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
执行detect出错。 #22
Comments
@MasonZong config.py 默认是coco的80类,如有需要在voc上测试,更改这个配置文件中的类别数目即可。 |
|
是model下的config吗 我改了class_num 依然不对啊怎么回事 |
当我执行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]).
`
The text was updated successfully, but these errors were encountered: