0

我正在尝试在自定义数据集上训练Detectron2 faster_rcnn_R_50_FPN_3x模型,在PublayNet数据集上进行预训练。在训练时,我收到以下警告:

WARNING [01/14 14:35:22 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.cls_score.weight' to the model due to incompatible shapes: (7, 1024) in the checkpoint but (6, 1024) in the model! You might want to double check if this is expected.
WARNING [01/14 14:35:22 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.cls_score.bias' to the model due to incompatible shapes: (7,) in the checkpoint but (6,) in the model! You might want to double check if this is expected.
WARNING [01/14 14:35:22 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.bbox_pred.weight' to the model due to incompatible shapes: (24, 1024) in the checkpoint but (20, 1024) in the model! You might want to double check if this is expected.
WARNING [01/14 14:35:22 fvcore.common.checkpoint]: Skip loading parameter 'roi_heads.box_predictor.bbox_pred.bias' to the model due to incompatible shapes: (24,) in the checkpoint but (20,) in the model! You might want to double check if this is expected.
WARNING [01/14 14:35:22 fvcore.common.checkpoint]: Some model parameters or buffers are not found in the checkpoint:
roi_heads.box_predictor.bbox_pred.{bias, weight}
roi_heads.box_predictor.cls_score.{bias, weight}

经过进一步调查,我从这个链接发现上述警告消息是预期的,因为我的数据集与预训练模型的类数不同,并且必须跳过一些预训练的权重。

publaynet 有 5 个类{"text", "title", "list", "table", "figure"},而我的数据集正好有这 5 个类。但不幸的是,在 publaynet 上预训练的模型有 6 个类。不是应该有5节课吗?我对这个额外的课程感到困惑,感谢任何帮助!

4

0 回答 0