pytorch-deeplab-xception icon indicating copy to clipboard operation
pytorch-deeplab-xception copied to clipboard

Pretrained Model not Loading

Open eriche7133 opened this issue 6 years ago • 7 comments

When I run the following line:

CUDA_VISIBLE_DEVICES=0,1,2,3 python train.py --backbone resnet --lr 0.007 --workers 4 --epochs 50 --batch-size 16 --gpu-ids 0,1,2,3 --checkname deeplab-resnet --eval-interval 1 --dataset pascal --resume 'deeplab-resnet.pth.tar'

based off of train_voc.sh, I get the following error:

Traceback (most recent call last): File "train.py", line 303, in main() File "train.py", line 292, in main trainer = Trainer(args) File "train.py", line 84, in init self.optimizer.load_state_dict(checkpoint['optimizer']) File "/home/eriche/anaconda3/envs/deeplabEnv/lib/python3.7/site-packages/torch/optim/optimizer.py", line 114, in load_state_dict raise ValueError("loaded state dict contains a parameter group " ValueError: loaded state dict contains a parameter group that doesn't match the size of optimizer's group

This is using the Resnet pretrained model downloaded from the GoogleDrive link on the README. Any help would be greatly appreciated.

eriche7133 avatar Apr 29 '19 21:04 eriche7133

i have the same question,have you fix it?

seeyouagain111 avatar Jun 24 '19 03:06 seeyouagain111

I have meet the same question,too.

kangmengmeng avatar Sep 17 '19 05:09 kangmengmeng

I have meet the same question,too.

johsnows avatar Oct 27 '19 11:10 johsnows

the same question.....

learningyan avatar Dec 05 '19 10:12 learningyan

me too,do you resolve it?

xc769458796 avatar Dec 29 '19 02:12 xc769458796

i solved it,you should set --freeze-bn True

xc769458796 avatar Dec 29 '19 03:12 xc769458796

i solved it,you should set --freeze-bn True

I have set --freeze-bn True, but it has the same error

CoolLoveBoy avatar Feb 29 '20 04:02 CoolLoveBoy