title: keras datagen.flow_from_directory class mode categorical get labels wrong
body: <p>I have training dataset of images for 24 class each class has 2800 image 
  the classes are separated one from each other in directory all in one directory called training </p>
  
  <p>i used the following code to load the data using keras :</p>
  
  <pre><code>datagen = ImageDataGenerator(rescale= 1./255
                               ,fill_mode='nearest')
  
  train_data = datagen.flow_from_directory('training-images',class_mode='categorical',
                                           target_size=(32,32))
  </code></pre>
  
  <p>it load the images but the images get the wrong label </p>
  
  <p>the directory structure as follows :</p>
  
  <pre><code>training-images/
    0/
       image.jpg
       .
       .
    1/
       image.jpg
       .
       .
    .
    .
    23/
       image.jpg
       .
       .
  </code></pre>