Skip to content

Error loading ckpt_mnist.pth: size mismatch for class_embedding.weight #10

@sweetice100

Description

@sweetice100

I downloaded the pretrained weights (ckpt_mnist.pth) from the Google Drive link in README.

When I try to run:
python test_example_mnist.py --task snapshot_optical --num_classes 10

I get this error:

size mismatch for class_embedding.weight: copying a param with shape torch.Size([10, 512]) from checkpoint, the shape in current model is torch.Size([10, 128]).
size mismatch for l1.0.weight: copying a param with shape torch.Size([1024, 1536]) from checkpoint, the shape in current model is torch.Size([1024, 1152]).

I also tried:

  • --task multicolor_optical
  • --task iterative_optical
  • test_example_celeba.py with all three tasks

All give the same dimension mismatch error.

Could you please tell me the correct command to use these pretrained weights? Or are the weights for an older version of the code?

Thanks!

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