PyTorch-Faster R-CNN模型训练好了后进行预测出现size mismatch for head.cls_loc.weight/cls_loc.bias/weight/bias
一、问题描述在大牛的一个讲解训练FasterR-CNN的B站视频上,我依他的步骤训练完了模型。然后进行预测的时候,出现了以下错误:RuntimeError:Error(s)inloadingstate_dictforFasterRCNN:sizemismatchforhead.cls_loc.weight:copyingaparamwithshapetorch.Size([40,2048])fro