title: Tensorflow’s flow_from_directory returns erroneous Set
body: <p>I am using ImageDataGenerator to create validation set ( for an image classification using TF (Keras) from a labeled directory of images. The directories are 0,1,2,3,4 corresponding to class of each image, they contain 488, 185, 130, 131, 91 images respectively.</p>
  
  <pre><code>train_image_generator = ImageDataGenerator(rescale=1./255) # Generator for our training data
  # validation_image_generator = ImageDataGenerator(rescale=1./255) # Generator for our validation data
  train_data_gen = train_image_generator.flow_from_directory(batch_size=batch_size,
                                                             directory=train_dir,
                                                             shuffle=True,
                                                             target_size=(IMG_HEIGHT, IMG_WIDTH),
                                                             class_mode='categorical')
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>Found 0 images belonging to 5 classes.
  </code></pre>
  
  <p>and the code below </p>
  
  <pre><code>validation_data_generator = train_image_generator.flow_from_directory(
      train_dir, # same directory as training data
      target_size=(IMG_HEIGHT, IMG_WIDTH),
      batch_size=batch_size,
      class_mode='categorical',
      subset='validation') # set as validation data
  </code></pre>
  
  <p>outputs:</p>
  
  <pre><code>Found 0 images belonging to 5 classes.
  </code></pre>
  
  <p>What is wrong please? I suppose the validation set has at least few images for last class!</p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>CS</p>