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

b导, 最近刚git的yolov5和这个yolov7tiny都出现了训练和验证权值不匹配的情况 #27

Open
DrizzleSh opened this issue Mar 9, 2024 · 0 comments

Comments

@DrizzleSh
Copy link

使用数据集训练之后保存权值到log文件夹中,随后将权值的路径复制到yolo.py的model_path中,再使用get_map.py计算map,在该阶段出现权值不匹配问题。
RuntimeError: Error(s) in loading state_dict for YoloBody:
size mismatch for yolo_head_P3.weight: copying a param with shape torch.Size([1071, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([255, 128, 1, 1]).
size mismatch for yolo_head_P3.bias: copying a param with shape torch.Size([1071]) from checkpoint, the shape in current model is torch.Size([255]).
size mismatch for yolo_head_P4.weight: copying a param with shape torch.Size([1071, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([255, 256, 1, 1]).
size mismatch for yolo_head_P4.bias: copying a param with shape torch.Size([1071]) from checkpoint, the shape in current model is torch.Size([255]).
size mismatch for yolo_head_P5.weight: copying a param with shape torch.Size([1071, 512, 1, 1]) from checkpoint, the shape in current model is torch.Size([255, 512, 1, 1]).
size mismatch for yolo_head_P5.bias: copying a param with shape torch.Size([1071]) from checkpoint, the shape in current model is torch.Size([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