title: input ran out of data; interrupting training
body: <p>I am trying to train a model with the dataset consisting of 160 images (80 -cars, 80 -planes) using image data-augmentation generators on TensorFlow v2.1. I am getting an error when I run the following code : </p>
  
  <pre><code>classifier.compile(optimizer='adam', loss='binary_crossentropy',
                     metrics=['accuracy'])
  from keras.preprocessing.image import ImageDataGenerator
  train_imagedata = ImageDataGenerator(rescale=1. / 255, shear_range=0.2,
          zoom_range=0.2, horizontal_flip=True)
  test_imagedata = ImageDataGenerator(rescale=1. / 255)
  training_set = \
      train_imagedata.flow_from_directory('data/training_set'
          , target_size=(64, 64), batch_size=32, class_mode='binary')
  val_set = \
      test_imagedata.flow_from_directory('data/val_set'
          , target_size=(64, 64), batch_size=32, class_mode='binary')
  history=classifier.fit(training_set, steps_per_epoch=30, epochs=30,
                           validation_data=val_set,
                           validation_steps=30)
  </code></pre>
  
  <p>The error is : </p>
  
  <pre><code>Found 160 images belonging to 2 classes.
  Found 40 images belonging to 2 classes.
  Epoch 1/30
   5/30 [====&gt;.........................] - ETA: 5s - loss: 0.5002 - accuracy: 0.8313WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 900 batches). You may need to use the repeat() function when building your dataset.
  WARNING:tensorflow:Your input ran out of data; interrupting training. Make sure that your dataset or generator can generate at least `steps_per_epoch * epochs` batches (in this case, 30 batches). You may need to use the repeat() function when building your dataset.
   5/30 [====&gt;.........................] - 2s 416ms/step - loss: 0.5002 - accuracy: 0.8313 - val_loss: 1.6599 - val_accuracy: 0.5000
  </code></pre>
  
  <p>Please suggest what could be done here to rectify this error? Thanks in Advance!</p>