1

There is ImageDataGenerator.flow() function, in which we pass our training images and it returns augmented images. But what does ImageDataGenerator.fit() function does?

Shiva Verma
  • 89
  • 2
  • 9

1 Answers1

2

For some transformations such as centering or scaling, the ImageDataGenerator needs statistics on the data such the feature-wise mean, standard deviation etc. The fit() method collects these statistics. This API is similar to how the preprocessing functions in scikit-learn work.

sdcbr
  • 7,021
  • 3
  • 27
  • 44