Get the number of batches in a DataBunch

(Vishal R) #1

How do I get the number of batches in a DataBunch? I checked the source but there was no method that returns this.

0 Likes

(Zachary Mueller) #2

It lives in the length of the dataloader,

len(data.train_dl) or len(data.valid_dl)
0 Likes