Training batch by batch

(Keren) #1

Is there a way to train batch by batch using cnn_learner?
I want to be able do something like this:
for batch_num in number_of_batches:
batch = batches[batch_num]
model1.forward(batch)
model2.forward(batch)

0 Likes

(Kushajveer Singh) #2

You can look into the source code of fit_one_cycle and easily modify it according to your needs.

0 Likes