Train with only one batch in lightning?

Is there an argument in to train with just one batch? I have heard lightning have this solution but I can not find how to use it.

Thank you!

trainer = Trainer(overfit_batches=0.0)

use only 1% of the train set (and use the train set for val and test)

trainer = Trainer(overfit_batches=0.01)

overfit on 10 of the same batches

trainer = Trainer(overfit_batches=10)

1 Like