facebookresearch / Mask2Former

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

change HIDDEN_DIM in configs/coco/instancesegmentation/maskformer2_R50_bs16_50ep.yaml #163

Open aihcyllop opened 2 years ago

aihcyllop commented 2 years ago

In configs/coco/instancesegmentation/maskformer2_R50_bs16_50ep.yaml, HIDDEN_DIM=256, My data category is only 1 category when I load pretrained model I adjust HIDDEN_DIM, It always report :

RuntimeError: Error(s) in loading state_dict for MaskFormer: size mismatch for sem_seg_head.predictor.query_feat.weight: copying a param with shape torch.Size([100, 256]) from checkpoint, the shape in current model is torch.Size([100, 16]).

Is there a way to solve it? Thanks. (I need to test different hidden dimension)