Training over multiple sessions

Basic question. I’m probably overlooking something, but:
I have trained a learner for image prediction, and saved it as a pkl file with the following code:

learn = unet_learner(dls, resnet34, metric=foreground_acc)
learn.fit(40, 1.20e-05)
learn.export(learner_name)

Trying to train it on all my images at once hits issues with running out of memory, so I would like to load the learner and put it through additional training sessions, passing in new images for it to learn from, before saving it again to repeat the process later.

Loading the learner works fine, which I’ve been doing with the following code:

learner = load_learner(learner_name)

However, that doesn’t allow for training, only for prediction.

How can I continue the training in multiple stages?

Hi, I think you should use learn.save(name) and learn.load(name)

That fixed it! Thanks!