I notice that load_encoder/save_encoder for RNNLearner do not only load/save the first layer of the RNN but they actually load/save the whole network.
For example load_model [https://github.com/fastai/fastai/blob/868513671bca40edf69729552be51d3503873d99/fastai/text/learner.py#L67]
for a text_classifier_learner, loads all the RNN layers
get_model(lm.model)[0]
returns
AWD_LSTM(
(encoder): Embedding(24, 50, padding_idx=1)
(encoder_dp): EmbeddingDropout(
(emb): Embedding(24, 50, padding_idx=1)
)
(rnns): ModuleList(
(0): WeightDropout(
(module): LSTM(50, 1152, batch_first=True)
)
(1): WeightDropout(
(module): LSTM(1152, 1152, batch_first=True)
)
(2): WeightDropout(
(module): LSTM(1152, 50, batch_first=True)
)
)
(input_dp): RNNDropout()
(hidden_dps): ModuleList(
(0): RNNDropout()
(1): RNNDropout()
(2): RNNDropout()
)
)
Is that behaviour correct? Should load_encoder load only the embedding and the first layer of the RNN?