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

Inference on pre-trained model using PS type #25

Open
kokhazade opened this issue Dec 20, 2024 · 0 comments
Open

Inference on pre-trained model using PS type #25

kokhazade opened this issue Dec 20, 2024 · 0 comments

Comments

@kokhazade
Copy link

Hi,

How can I use -e option to do evaluation for a trained model that has used PS shift type? By running the following command:
CUDA_VISIBLE_DEVICES=0 python cifar10.py --arch resnet18 -e --weights models/cifar10/resnet18/shift_ps_all_wb_5/checkpoint.pth.tar

I get the following error:

RuntimeError: Error(s) in loading state_dict for ResNet:
        Missing key(s) in state_dict: "conv1.weight", "layer1.0.conv1.weight", "layer1.0.conv2.weight", "layer1.1.conv1.weight", "layer1.1.conv2.weight", "layer2.0.conv1.weight", "layer2.0.conv2.weight", "layer2.1.conv1.weight", "layer2.1.conv2.weight", "layer3.0.conv1.weight", "layer3.0.conv2.weight", "layer3.1.conv1.weight", "layer3.1.conv2.weight", "layer4.0.conv1.weight", "layer4.0.conv2.weight", "layer4.1.conv1.weight", "layer4.1.conv2.weight", "linear.weight". 
        Unexpected key(s) in state_dict: "conv1.shift", "conv1.sign", "layer1.0.conv1.shift", "layer1.0.conv1.sign", "layer1.0.conv2.shift", "layer1.0.conv2.sign", "layer1.1.conv1.shift", "layer1.1.conv1.sign", "layer1.1.conv2.shift", "layer1.1.conv2.sign", "layer2.0.conv1.shift", "layer2.0.conv1.sign", "layer2.0.conv2.shift", "layer2.0.conv2.sign", "layer2.1.conv1.shift", "layer2.1.conv1.sign", "layer2.1.conv2.shift", "layer2.1.conv2.sign", "layer3.0.conv1.shift", "layer3.0.conv1.sign", "layer3.0.conv2.shift", "layer3.0.conv2.sign", "layer3.1.conv1.shift", "layer3.1.conv1.sign", "layer3.1.conv2.shift", "layer3.1.conv2.sign", "layer4.0.conv1.shift", "layer4.0.conv1.sign", "layer4.0.conv2.shift", "layer4.0.conv2.sign", "layer4.1.conv1.shift", "layer4.1.conv1.sign", "layer4.1.conv2.shift", "layer4.1.conv2.sign", "linear.shift", "linear.sign".
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