Update batch size of existing databunch created by .databunch()

In notebook lesson 3 planet, there is the following creation of dataset:

src = (ImageList.from_csv(path, 'train_v2.csv', folder='train-jpg', suffix='.jpg')
       .split_by_rand_pct(0.2)
       .label_from_df(label_delim=' '))
data = (src.transform(tfms, size=128)
        .databunch().normalize(imagenet_stats))

Where can I find in documentation information about this .databunch()? The default batch size value for instance, and how to update it?

Thank you in advance
K.

Ok I finally get type in the notebook:

temp=src.transform(tfms, size=128)
temp.databunch??

and figured out the bs parameter was meant to be given there
So I didn’t update the bs for the existing data, but just created a new data with bs parameter in the .databunch call

In case it might help others…

Still interesting to know if there is a way to do something like
data.bs=32

the same way we update data in a learner by doing
learner.data=data

You can do data.batch_size = ...

4 Likes