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

Visualization results #12

Open
jisheng8 opened this issue Nov 9, 2023 · 0 comments
Open

Visualization results #12

jisheng8 opened this issue Nov 9, 2023 · 0 comments

Comments

@jisheng8
Copy link

jisheng8 commented Nov 9, 2023

After running the net.py file, the model file. pth was obtained. However, the following error reasons occurred while running the visualization file. How to solve them:
Traceback (most recent call last):
File "result_visual.py", line 18, in
model.load_state_dict(torch.load(MODEL_PATH))
File "/remote-home/js/anaconda3/envs/capsnet2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1224, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for CapsNetWithReconstruction:
Missing key(s) in state_dict:"capsnet.conv1.weight", "capsnet.conv1.bias", "capsnet.primaryCaps.conv.weight", "capsnet.primaryCaps.conv.bias", "capsnet.digitCaps.weights", "capsnet.digitCaps.routing_module.b", "reconstruction_net.fc1.weight", "reconstruction_net.fc1.bias", "reconstruction_net.fc2.weight", "reconstruction_net.fc2.bias", "reconstruction_net.fc3.weight", "reconstruction_net.fc3.bias".
Unexpected key(s) in state_dict:"conv1.weight", "conv1.bias", "primaryCaps.conv.weight", "primaryCaps.conv.bias", "digitCaps.weights", "digitCaps.routing_module.b".

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