youtubevos / MaskTrackRCNN

MaskTrackRCNN for video instance segmentation based on mmdetection
Apache License 2.0
431 stars 75 forks source link

Using mmcv to load model with unmatched weight dimensions #1

Open linjieyangsc opened 5 years ago

linjieyangsc commented 5 years ago

When using mmcv to load pytorch model with unmatched weight dimensions, it will raise an exception. Make the following change to load such a model.

# [python_lib_path]/site-packages/mmcv/runner/checkpoint.py
# L53, change to print
            print('While copying the parameter named {}, '
                  'whose dimensions in the model are {} and '
                  'whose dimensions in the checkpoint are {}.'
                  .format(name, own_state[name].size(),
                          param.size()))
FinalFlowers commented 4 years ago

@linjieyangsc What does that mean? How to change it?

linjieyangsc commented 4 years ago

@FinalFlowers sorry for the confusion. You need to edit this file in your python instsall path [python_lib_path]/site-packages/mmcv/runner/checkpoint.py And modify the Line53 with the above changes.

CocoRLin commented 4 years ago

Hi!Thanks for reminding this problem! I wonder which version of mmcv do you use?