ReTrain model on a new Dataset. Can't load previous result

Hi.
I am new here. Would help me with a very simple question. I am working with text_classifier_learner.

  1. I’ve train a model (for instance learn.fit_one_cycle(…) for a 1st dataset A.
  2. I’ve save a result (learn.save(‘result_A’)).
  3. I have a new, bigger dataset B.
    How can I use previously saved result_A?
    I’ve tried just to learn_B.load(‘result_A’), but it’s doesn’t work size.

Thank you so much in advance.
best

P.S. I wanted to do this step:

1 Like

The text learner is generally tied up to the Vocab. Check the length of

len(dls.vocab[0])

and also check the embedding size of the model

learn.model

for both the datasets.

My guess would be that the vocab for the 2 datasets is different, which will, in turn, affect the model embedding size.

In case the above is not true, then share the error you are getting and the steps to recreate it?

Thank you. It works.

1 Like