facebookresearch / Mask2Former

Code release for "Masked-attention Mask Transformer for Universal Image Segmentation"
MIT License
2.59k stars 388 forks source link

Ambiguous checkpoint key error when running train_net.py #229

Closed ShnitzelKiller closed 9 months ago

ShnitzelKiller commented 9 months ago

I have tried training with the example config configs/Base-COCO-PanopticSegmentation.yaml, but it throws an error while loading the initial model weights.

ERROR [02/16 16:31:50 d2.checkpoint.c2_model_loading]: Ambiguity found for res5.0.conv1.norm.bias in checkpoint!It matches at least two keys in the model (roi_heads.res5.0.conv1.norm.bias and backbone.res5.0.conv1.norm.bias)

It seems that the backbone and roi_head both use a ResNet module and it can't decide which one the weights belong to. Is the config file incorrectly specified somehow?

ShnitzelKiller commented 9 months ago

Never mind, that was just the base config, not the full training config (one of configs/coco/panoptic-segmentation/maskformer2_R50_bs16_50ep.yaml or configs/coco/panoptic-segmentation/maskformer2_R101_bs16_50ep.yaml).