marialeyvallina / generalized_contrastive_loss

MIT License
87 stars 14 forks source link

I can't load pre-trained models on MSLS #10

Closed tojiboyevf closed 2 years ago

tojiboyevf commented 2 years ago

Dear Maria,

Thanks for your work and effort. I can't test your models which has GeM pooling. It can't load and shows following error:

model.load_state_dict(torch.load(args.resume_model)["model_state_dict"])
  File "/usr/local/lib/python3.7/dist-packages/torch/nn/modules/module.py", line 1605, in load_state_dict
    self.__class__.__name__, "\n\t".join(error_msgs)))
RuntimeError: Error(s) in loading state_dict for BaseNet:
    Unexpected key(s) in state_dict: "pool.p".