You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But I'm wondering how to use load_state_dict(), in episodic_training.ipynb you use few_shot_classifier.load_state_dict(best_state), but classical_training.ipynb you use model.load_state_dict(best_state) while the the former is PrototypicalNetworks and the latter is resnet12.
Looking for your reply!
The text was updated successfully, but these errors were encountered:
It's because in episodic training we train the few-shot classifier, while in classical training we only train the feature extractor.
So maybe in classical_training.ipynbbest_state = copy.deepcopy(few_shot_classifier.state_dict()) should be best_state = copy.deepcopy(model.state_dict()), and it would not cause error like RuntimeError: Error(s) in loading state_dict for ResNet : Missing key(s) in state_dict: "conv1.weight", ...
Thank you for your outstanding work!
But I'm wondering how to use
load_state_dict()
, in episodic_training.ipynb you usefew_shot_classifier.load_state_dict(best_state)
, but classical_training.ipynb you usemodel.load_state_dict(best_state)
while the the former is PrototypicalNetworks and the latter is resnet12.Looking for your reply!
The text was updated successfully, but these errors were encountered: