Skip to content
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

get_map.py #120

Open
mimi37 opened this issue Jan 19, 2024 · 1 comment
Open

get_map.py #120

mimi37 opened this issue Jan 19, 2024 · 1 comment

Comments

@mimi37
Copy link

mimi37 commented Jan 19, 2024

B导,我直接装载yolo_l.pth,同时也在yolo.py修改了phi=l,但是运行get_map.py缺报错如下,辛苦帮忙看下问题,我感觉是对应的呀。 yolo = YOLO(model_path = model_path,confidence = confidence, nms_iou = nms_iou, modify=-1)
RuntimeError: Error(s) in loading state_dict for YoloBody:
size mismatch for yolo_head_P3.weight: copying a param with shape torch.Size([255, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([75, 256, 1, 1]).
size mismatch for yolo_head_P3.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([75]).
size mismatch for yolo_head_P4.weight: copying a param with shape torch.Size([255, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([75, 512, 1, 1]).
size mismatch for yolo_head_P4.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([75]).
size mismatch for yolo_head_P5.weight: copying a param with shape torch.Size([255, 1024, 1, 1]) from checkpoint, the shape in current model is torch.Size([75, 1024, 1, 1]).
size mismatch for yolo_head_P5.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([75]).

@mimi37
Copy link
Author

mimi37 commented Jan 19, 2024

为啥预训练模型的head部分最后的C=255呢?想问一下怎么解决,谢谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant