Skip to content

RuntimeError: Error(s) in loading state_dict for ShuffleNetV2: #7

@BarryKCL

Description

@BarryKCL

[root@e31325cc657e FIIQA-PyTorch]# python3 test.py
Traceback (most recent call last):
File "test.py", line 48, in
net.load_state_dict(checkpoint['net'])
File "/usr/local/lib64/python3.6/site-packages/torch/nn/modules/module.py", line 1045, in load_state_dict
self.class.name, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for ShuffleNetV2:
size mismatch for classifier.0.weight: copying a param with shape torch.Size([200, 1024]) from checkpoint, the shape in current model is torch.Size([160, 1024]).
size mismatch for classifier.0.bias: copying a param with shape torch.Size([200]) from checkpoint, the shape in current model is torch.Size([160]).

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