使用mmdetection进行测试时,出现The model and loaded state dict do not match exactly的问题

mmdetection的初学者,在使用faster-rcnn进行coco数据集和voc数据集测试的时候,均出现了The model and loaded state dict do not match exactly的问题。

The model and loaded state dict do not match exactly

size mismatch for roi_head.bbox_head.fc_cls.weight: copying a param with shape torch.Size([21, 1024]) from checkpoint, the shape in current model is torch.Size([2, 1024]).
size mismatch for roi_head.bbox_head.fc_cls.bias: copying a param with shape torch.Size([21]) from checkpoint, the shape in current model is torch.Size([2]).
size mismatch for roi_head.bbox_head.fc_reg.weight: copying a param with shape torch.Size([80, 1024]) from checkpoint, the shape in current model is torch.Size([4, 1024]).
size mismatch for roi_head.bbox_head.fc_reg.bias: copying a param with shape torch.Size([80]) from checkpoint, the shape in current model is torch.Size([4]).
completed: 0, elapsed: 0s
---------------iou_thr: 0.5---------------
Traceback (most recent call last):
  File "tools/test.py", line 237, in <module>
    main()
  File "tools/test.py", line 229, in main
    metric = dataset.evaluate(outputs, **eval_kwargs)
  File "/home/ccf_disk/hzl/anaconda3/envs/mmlab/lib/python3.7/site-packages/mmdet/datasets/voc.py", line 85, in evaluate
    use_legacy_coordinate=True)
  File "/home/ccf_disk/hzl/anaconda3/envs/mmlab/lib/python3.7/site-packages/mmdet/core/evaluation/mean_ap.py", line 353, in eval_map
    num_classes = len(det_results[0])  # positive class num
IndexError: list index out of range
(mmlab) huangzhenglin@lab317-PowerEdge-R940xa:/home/ccf_disk/hzl/mmdetection$ 


请问这是什么原因?感激不尽

IndexError: list index out of range

这不是都写了吗,某个数组越界了,断点调试看看是不是索引的问题