Skip to content

Visualization results #12

@jisheng8

Description

@jisheng8

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions