Batch_size (ImageDataGenerator) vs batch_size (in vs steps_per_epoch (in

Hi all…

In the courses I saw different way to set the batch size for training.

batch_size can be defined in ImageDatagenerator but also in in, and it is possible to set it using steps_per_epoch, still in

Can conflicts arise if batch_size will be defined differently using the ImageDataGenerator or method? If both are set, which one will be used as the batch size used for epoch?

steps_per_epoch can also be used to define batch, I suppose, in I think it’s a little less straightforward. Can there also arise a conflict with batch_size defined in ImageDatagenerator? When is steps_per_epoch useful instead of batch_size?

Thank you for your support.


I think that batch_size parameter in is the one that determines the batch_size in model compilation, the steps_per_epoch determines when to end the epoch (you may end it before all data is exhausted).

Have a read at this link: