title: In what order does 'flow_from_directory' function in keras takes the samples?
body: <p>I'm trying to classify images into 10 classes. To get probabilities for images, I'm using model.predict_generator() function in keras. This returns only prediction values and not the corresponding sample ID(In this case image file name).</p>
  
  <pre><code>test_datagen = ImageDataGenerator(rescale=1./255)
  
  validation_generator = test_datagen.flow_from_directory(
          '/path/',
          target_size=(256, 256),
          batch_size=32,`
          class_mode='categorical')
  
  predictions = model.predict_generator(validation_generator, val_samples=10000)
  </code></pre>
  
  <p>In what order does the '.flow_from_directory' read the samples?</p>
  
  <p>(OR)</p>
  
  <p>How do I find the corresponding image name/id of the predictions?</p>
  
  <p>Click <a href="https://github.com/Vivek-B/Kaggle/blob/master/State%20Farm%20Distracted%20Driver%20Detection/Predictions.ipynb" rel="noreferrer">here</a> for the code.</p>