title: Keras - steps_per_epoch calculation not matching with the ImageDataGenerator output
body: <p>I am working on a basic Classification task with Keras and I seem to have stumbled upon a problem where I need some assistance.  </p>
  
  <p>I have 200 samples for training and a 100 for validation, I intend to use a ImageDataGenerator to increase the number of training samples for my task. I want to make sure of the total number of training images that are passed to the fit_generator().</p>
  
  <p>I know that the steps_per_epoch defines the total number of batches we get from a generator and ideally it should be number of samples  divided by the batch size.</p>
  
  <p>However, this is where things do not add up for me. Here is a snippet of my code:</p>
  
  <pre><code>num_samples = 200
  batch_size = 10
  gen = ImageDataGenerator(horizontal_flip = True,
                       vertical_flip = True,
                       width_shift_range = 0.1,
                       height_shift_range = 0.1,
                       zoom_range = 0.1,
                       rotation_range = 10
                      )
  x,y = shuffle(img_data,img_label, random_state=2)
  x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.333, random_state=2)
  generator = gen.flow(x_train, y_train, save_to_dir='check_images/sample_run')
  new_network.fit_generator(generator, steps_per_epoch=len(x_train)/batch_size, validation_data=(x_test, y_test), epochs=1, verbose=2)
  </code></pre>
  
  <p>I am saving the augmented images to see how the images turn out from the ImageDataGenerator and also to ascertain the number of images that are generated from it. </p>
  
  <p>After running this code for a single epoch, I get 600 images in my directory, a number which I cannot arrive at, or maybe I am making a mistake.</p>
  
  <p>Any assistance in making me understand the calculation in this code would be deeply appreciated. Has anyone come across similar problems ?</p>
  
  <p>TIA</p>