VainF / DeepLabV3Plus-Pytorch

Pretrained DeepLabv3 and DeepLabv3+ for Pascal VOC & Cityscapes
MIT License
1.94k stars 438 forks source link

Mismatch tensor size #105

Open Albert0511 opened 1 year ago

Albert0511 commented 1 year ago

When I try to load the pretrained model. With command python predict.py --input datasets/data/cityscapes/leftImg8bit/train/bremen/bremen_000000_000019_leftImg8bit.png - -dataset cityscapes --model deeplabv3_resnet50 --ckpt ./deeplabv3/best_deeplabv3_resnet50_voc_os16.pth --save_val_results_to test_results, I got size mismatch for classifier.classifier.4.weight: copying a param with shape torch.Size([21, 256, 1, 1]) from checkpoint, the shape in current model is torch.Size([19, 256, 1, 1]). size mismatch for classifier.classifier.4.bias: copying a param with shape torch.Size([21]) from checkpoint, the shape in current model is torch.Size([19]).