Are each epochs independent from one another?

Hi, I was wondering if calling learn.fit_one_cycle(1, slice(lr)) 5 times and calling learn.fit_one_cycle(5, slice(lr)) are the same, ie: are each epochs independent from one another ?
Thank you in advance for your insights !

learn.fit_one_cycle(1, slice(lr)) will do one epoch, slowly increasing the learning rate up to lr, then back down.

When running learn.fit_one_cycle(1, slice(lr)) 5 times, the learning rate will go up and down 5 times.

learn.fit_one_cycle(5, slice(lr)) will do 5 epochs, slowly increasing the learning rate up to lr, then back down, over the course of 5 epochs.

When running learn.fit_one_cycle(5, slice(lr)) once, the learning rate will go up and down only once.

I found this blog post to explain it pretty well:

2 Likes