title: Why the validation data is small?
body: <p>When I break by image dataset into train and validation using the following code:</p>
  <pre><code>datagen_kwargs = dict(rescale=1./255, validation_split=.20)
  valid_datagen = tf.keras.preprocessing.image.ImageDataGenerator(**datagen_kwargs)
  valid_generator = valid_datagen.flow_from_directory(
    TRAINING_DATA_DIR,
    subset=&quot;validation&quot;,
    shuffle=True,
    target_size=IMAGE_SHAPE
  )
  train_datagen = tf.keras.preprocessing.image.ImageDataGenerator(**datagen_kwargs)
  train_generator = train_datagen.flow_from_directory(
    TRAINING_DATA_DIR,
    subset=&quot;training&quot;,
    shuffle=True,
    target_size=IMAGE_SHAPE)
  </code></pre>
  <p>I get the following output: &quot;Found 1997 images belonging to 5 classes.
  Found 7999 images belonging to 5 classes.&quot;</p>
  <p>So my validation data has 1997 images and train data has 7999 images.</p>
  <p>Now, I am trying to make predictions on the validation data using my trained model. I use <code>val_image_batch, val_label_batch = next(iter(valid_generator))</code> to extract the images and labels. When I print the length of <code>val_image_batch</code> or <code>val_label_batch</code> I get 32 instead of 1997- the size of my validation data.</p>
  <p>I want to make predictions on the entire validation data and not just 32 images. Can someone help me figure the problem?</p>
  <p>I used this <a href="https://medium.com/analytics-vidhya/create-tensorflow-image-classification-model-with-your-own-dataset-in-google-colab-63e9d7853a3e" rel="nofollow noreferrer">article</a> for help.</p>