Fastai v2 equivalent for this v1 code

If in the v1 I had some code like below
lr = 1.2e-3
learn.fit(lr,15)
lr_lst=np.array([lr/100,lr/10,lr])
# differential
learn.fit(lr_lst/4, 3, cycle_len=1, cycle_mult=2)
# fine tune
learn.fit(lr_lst/10,1,cycle_len=5,use_clr=(10,32))
what would be the v2 equivalent of the above ?

PS: Sorry about the bad formatting.

Current version on github is ‘1.0.41.dev0’

What do you mean by “V2”?

The old fastai codebase does not contain many of the above options and looks like it has been superseeded by calls such as fit_one_cycle. The fit_one_cycle() call also does not contain some of the above options such as cycle_mult and use_clr.

I was wondering how I would reproduce the above code using the new fit_one_cycle and fit calls.

Thanks.

I think what you mean is “Fastai v1 equivalent of this v0.7 code”

Right, thanks for the correction. Is there any equivalent notebooks out there?

There are 2 places you can look at the moment:

  1. official fast.ai v1 documentation here and
  2. notebooks for Deep Learning for Coders v3 here

It may not be 100% equivalent to what you’re trying to do, but will get the job done.