yanghr / BSQ

BSQ: Exploring Bit-Level Sparsity for Mixed-Precision Neural Network Quantization (ICLR 2021)
https://openreview.net/forum?id=TiXl51SCNw8
Apache License 2.0
36 stars 9 forks source link

error happens in training #4

Open Arthur-Ling opened 8 months ago

Arthur-Ling commented 8 months ago

when I run "python cifar_prune_STE.py -a resnet --depth 20 --epochs 350 --lr 0.1 --schedule 250 --gamma 0.1 --wd 1e-4 --model checkpoints/cifar10/resnet-20-8/model_best.pth.tar --decay 0.01 --Prun_Int 100 --thre 0.0 --checkpoint checkpoints/cifar10/xxx --Nbits 8 --act 4 --bin --L1", error happens:

RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict: "module.layer2.0.downsample.0.weight", "module.layer3.0.downsample.0.weight". Unexpected key(s) in state_dict: "module.layer2.0.downsample.0.pweight", "module.layer2.0.downsample.0.nweight", "module.layer2.0.downsample.0.scale", "module.layer3.0.downsample.0.pweight", "module.layer3.0.downsample.0.nweight", "module.layer3.0.downsample.0.scale".

What should I do?

Huanxi2018 commented 7 months ago

when I run "python cifar_prune_STE.py -a resnet --depth 20 --epochs 350 --lr 0.1 --schedule 250 --gamma 0.1 --wd 1e-4 --model checkpoints/cifar10/resnet-20-8/model_best.pth.tar --decay 0.01 --Prun_Int 100 --thre 0.0 --checkpoint checkpoints/cifar10/xxx --Nbits 8 --act 4 --bin --L1", error happens:

RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict: "module.layer2.0.downsample.0.weight", "module.layer3.0.downsample.0.weight". Unexpected key(s) in state_dict: "module.layer2.0.downsample.0.pweight", "module.layer2.0.downsample.0.nweight", "module.layer2.0.downsample.0.scale", "module.layer3.0.downsample.0.pweight", "module.layer3.0.downsample.0.nweight", "module.layer3.0.downsample.0.scale".

What should I do?

I have missed the same question yet. Did you solve it?

zwxandy commented 7 months ago

when I run "python cifar_prune_STE.py -a resnet --depth 20 --epochs 350 --lr 0.1 --schedule 250 --gamma 0.1 --wd 1e-4 --model checkpoints/cifar10/resnet-20-8/model_best.pth.tar --decay 0.01 --Prun_Int 100 --thre 0.0 --checkpoint checkpoints/cifar10/xxx --Nbits 8 --act 4 --bin --L1", error happens:

RuntimeError: Error(s) in loading state_dict for DataParallel: Missing key(s) in state_dict: "module.layer2.0.downsample.0.weight", "module.layer3.0.downsample.0.weight". Unexpected key(s) in state_dict: "module.layer2.0.downsample.0.pweight", "module.layer2.0.downsample.0.nweight", "module.layer2.0.downsample.0.scale", "module.layer3.0.downsample.0.pweight", "module.layer3.0.downsample.0.nweight", "module.layer3.0.downsample.0.scale".

What should I do?

I have met the same problem when I running this command.