Saving Models and Loading Encoders

Hi,

I was wondering if someone could help me understand the difference between loading a model, and loading the encoder.

When l want to continue training a model I was working on, should I first do learn = learn.load(model_path),
then call learn.load_encoder('name')

or should i call
learner = text_classifier_learner(data_clas,AWD_LSTM,config = config, drop_mult=0.5)
then call l learn.load_encoder('name')

Thank you in advance!

I am not 100 sure but I think Jeremy talked about the difference in the nlp class. Most likely in the imdb lesson. I am pretty sure that the model includes the encoder, so both should work, you need to make sure that you are loading in both the vocab and the encoder. If you haven’t done so already check out the nlp class it is awesome.

Hi Daniel,

I really appreciate you getting back to me. Are you referring to the courses on https://course.fast.ai/ ?

See github.com/fastai/course-nlp for the nlp course :slight_smile: that’s what he is referring to

haha, I was too slow

well done!

1 Like

haha, thank you :slight_smile:

Thank you! I appreciate you taking the time to help :slight_smile: