Frankluox / LightningFSL

LightningFSL: Pytorch-Lightning implementations of Few-Shot Learning models.
MIT License
107 stars 17 forks source link

Problem when reproducing Meta-baseline #12

Closed LIUZIJING-CHN closed 2 years ago

LIUZIJING-CHN commented 2 years ago

Excuse me, After I finished the pretraining of meta-baseline, I got an error when loading the pretrained model in finetune stage. RuntimeError: Error(s) in loading state_dict for ProtoNet: Missing key(s) in state_dict "classifier.scale_cls". Unexpected key(s) in state_dict: "classifier.weight", "classifier.bias". It seems that you may have a wrong setting in the file _set_config_meta_baselinefinetune.py

Frankluox commented 2 years ago

Yes. Thanks for reporting the wrong setting. Please set config_dict["load_backbone_only"] in line 23 to True and see if everything goes well.

LIUZIJING-CHN commented 2 years ago

Thx, it works.