oscarknagg / few-shot

Repository for few-shot learning machine learning projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BUG: model CANNOT be shared in a derived class

zhangyikaii opened this issue · comments

Hi,

Thank you for sharing the repo. In the derived class of the integration operation callbacks. I noticed that the self.model was called in 'ModelCheckpoint'.

But the ONLY place where the self.model has been updated is set_model in the base class. (Note that the fitting function like proto_net_episode is using another variable which is defined here)

This bug causes the model saved here not to be a trained model. (There's an error here, too, but it's not called in ProtoNet.)
My suggested solution is don't make the model be a member variable of the base class(like self.model).

Anyway, Callback's derived way of integrating operations is still commendable. Thank you.

Sorry, I could be wrong.