Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't load provided checkpoints #34

Open
L-ED opened this issue Mar 21, 2022 · 0 comments
Open

Can't load provided checkpoints #34

L-ED opened this issue Mar 21, 2022 · 0 comments

Comments

@L-ED
Copy link

L-ED commented Mar 21, 2022

I downloaded baseline and quantized .pth files for resnet18 and 50, but when i'm trying to load them i'm facing with error

python quant_train.py -a resnet50 --epochs 1 --lr 0.0001 --batch-size 128 --data data/imagenet/ --pretrained --save-path ./checkpoints/ --act-range-momentum=0.99 --wd 1e-4 --data-percentage 0.0001 --fix-BN --checkpoint-iter -1 --quant-scheme uniform8 --resume ./HAWQ/loaded_models/resnet50_baseline/resnet50.pth

Traceback (most recent call last):
File "quant_train.py", line 766, in
main()
File "quant_train.py", line 205, in main
main_worker(args.gpu, ngpus_per_node, args)
File "quant_train.py", line 242, in main_worker
checkpoint = torch.load(args.resume)['state_dict']
KeyError: 'state_dict'

python quant_train.py -a resnet18 --epochs 1 --lr 0.0001 --batch-size 128 --data data/imagenet/ --pretrained --save-path ./checkpoints/ --act-range-momentum=0.99 --wd 1e-4 --data-percentage 0.0001 --fix-BN --checkpoint-iter -1 --quant-scheme uniform8 --resume "/workspace/LyginE/projects/paradigma/quantization/HAWQ/loaded_models/resnet18_uniform8/quantized_checkpoint.pth.tar" --resume-quant

Traceback (most recent call last):
File "quant_train.py", line 766, in
main()
File "quant_train.py", line 205, in main
main_worker(args.gpu, ngpus_per_node, args)
File "quant_train.py", line 307, in main_worker
checkpoint = torch.load(args.resume)['state_dict']
KeyError: 'state_dict'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant