AlibabaResearch / AlibabaResearch/efficientteacher

RuntimeError: Error(s) in loading state_dict for Model

オープン
#16 コメント 30 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
813
フォーク
126
PR マージ指標
30日以内にマージされた PR はありません

説明

你好,我想用yolov5 v6.1的yolov5s.pt作为预训练模型,通过convert_pt_to_efficient.py转换yolov5s.pt得到e-yolov5s.pt,转换的配置文件用的是configs/sup/public/yolov5s_coco.yaml,转换过程没有报错,于是我用这个e-yolov5s.pt直接采用半监督的方式训练20个类别的模型,但是我在加载e-yolov5s.pt的时候报如下的错误:RuntimeError: Error(s) in loading state_dict for Model:
size mismatch for head.m.0.weight: copying a param with shape torch.Size([255, 128, 1, 1]) from checkpoint, the shape in current model is torch.Size([75, 128, 1, 1]).
size mismatch for head.m.0.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([75]).
size mismatch for head.m.1.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 head.m.1.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([75]).
size mismatch for head.m.2.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 head.m.2.bias: copying a param with shape torch.Size([255]) from checkpoint, the shape in current model is torch.Size([75]).
Traceback (most recent call last):

这是不是意味着,半监督的预训练模型不能直接用官方80个类别的进行训练呢

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。