-
Notifications
You must be signed in to change notification settings - Fork 48
Loading of checkpoint fails #7
Comments
This is a fix which works for checkpoints provided as local files, it fails however for models given by URL. I think this is due internals of mmcv-fulls load_checkpoint handling. It succeeds with local checkpoints, since the internally called load_from_local returns a checkpoint, whereas URL triggers load_from_http which returns the state_dict directly and crashes. Which version of mmcv-full did you use for your project, maybe this error is only present in the latest version I'm using (mmcv-full==1.3.7)? |
Tried your fix but still getting an error where none of the weights are loaded from the pretrained model. Will try load_checkpoint() from here and report back. |
Did you succeed? The fix also uses load_checkpoint via the init-weights (see here), which loads the backbone weights in the xcit-model. The weights for the neck included in the checkpoint aren't loaded with this approach, but this was better than nothing and helped with transfer learning. |
No luck! I get this: |
Here's how I fixed it:
|
The semseg training command (from semantic_segmentation/README.md)
tools/dist_train.sh configs/xcit/sem_fpn/sem_fpn_xcit_small_12_p16_80k_ade20k.py 8 --work-dir /path/to/save --seed 0 --deterministic --options model.pretrained=https://dl.fbaipublicfiles.com/xcit/xcit_small_12_p16_384_dist.pth
fails with
The text was updated successfully, but these errors were encountered: