AlibabaResearch / AlibabaResearch/efficientteacher

RuntimeError: Error(s) in loading state_dict for Model

Ouverte
#16 30 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
813
Forks
126
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

你好,我想用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个类别的进行训练呢

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.