title: Fit generator and data augmentation in keras
body: <p>I have a test dataset of 5 samples and a train dataset of 2000 samples. I would like to augment my datasets and I am following the example provided by <a href="https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html" rel="nofollow noreferrer">keras</a></p>
  
  <pre><code>datagen_test = ImageDataGenerator(
                  featurewise_center=True,
                  featurewise_std_normalization=True,
                  rotation_range=20,
                  width_shift_range=0.2,
                  height_shift_range=0.2,
                  horizontal_flip=True
                  )
  datagen_train = ImageDataGenerator(
                  featurewise_center=True,
                  featurewise_std_normalization=True,
                  rotation_range=20,
                  width_shift_range=0.2,
                  height_shift_range=0.2,
                  horizontal_flip=True
                  )
  datagen_train.fit(x_train)
  validation_generator = datagen_test.flow(x_test, y_test, batch_size=5)
  
  
  model.compile(loss=keras.losses.categorical_crossentropy,
            optimizer='rmsprop',
            metrics=['accuracy'])
  # fits the model on batches with real-time data augmentation:
  model.fit_generator(datagen_train.flow(x_train, y_train, batch_size=50),
                  steps_per_epoch=len(x_train) / 10, epochs=epochs, 
                  validation_data=validation_generator, validation_steps=800)
  </code></pre>
  
  <p>What I believe is that the <strong>steps_per_epoch</strong> parameter is the number of batches passed to the classifier. I set the <strong>batch_size</strong> in my generator to be 50, however I have only 5 samples. I think my questions has nothing to do with the <strong>samples_per_epoch</strong> which is the the number of samples processed in one epoch.</p>
  
  <p>My question is:
  Will the generator transform my images in order to create 50 different samples and pass them to the classifier or will transform only 5? </p>