Resuming training from where it was left/ended

#1

Hi,
I would like to further train my model which was trained up to 20 epochs. I followed some guide lines but could not get it. Here, I post a clipping of the code. Can anyone please help on this. The code runs but it does not resume training instead only shows the table.
Thanks.


0 Likes

(giuseppe) #2

when calling fit_one_cycle() you need to pass the “real” total number of epochs you are trying to train for, and not only the ones left. So if you intend to train for 20 epochs, your second call should be something like

learn.fit_one_cycle(20,start_epoch=19)

since you are calling it with the first argument =10 and start =19, you are telling the library you are already over with training

2 Likes

#3

Hi @g13e ,
Yes it worked. Thanks a lot for your help. :blush:

1 Like