Following this topic : Why does learn.load return self?
After doing some NLP the other day, I noticed that both methods load_encoder
and load_pretrained
of the RNNLearner
class perform their loading in place and return nothing. This is a different behavior than the ‘classic’ load
method of a learner, I can do :
learn = text_classifier_learner(...).load(...)
but
learn = text_classifier_learner(...).load_encoder(...)
will return None.
This seems not optimal for the user to have such similar method behave differently. Is there a reason for those methods to return nothing, and if not, should they be changed to behave more like load
?