title: Keras ImageDataGenerator doesn't work properly with shuffle
body: <p>I have created two ImageDataGenerator objects to process two images at the same time (one image and his mask) to train an autoencoder/u-net. To randomize the dataset I set <code>shuffle=True</code>. I take these images from two folders (one for the image and other for the mask), so I use two <code>flow_from_directory</code> with the same seed. However, in practice that doesn't work and the mask extracted doesn't correspond to the extracted image. Both images (image and mask) have the same file name.</p>
  
  <p>Here is the code I have:</p>
  
  <pre><code>data_gen_args = dict(rescale = 1./255,
                       rotation_range = 5,
                      zoom_range = 0.05,
                      horizontal_flip = True)
  image_datagen = ImageDataGenerator(**data_gen_args)
  mask_datagen = ImageDataGenerator(**data_gen_args)
  
  seed = 1
  
  image_generator = image_datagen.flow_from_directory(
      'data/train_'+str(shape),
      color_mode = 'grayscale',
      class_mode = None,
      batch_size = batch_size,
      shuffle = True,
      seed = seed)
  
  mask_generator = mask_datagen.flow_from_directory(
      'data/train_mask_'+str(shape),
      color_mode = 'grayscale',
      class_mode = None,
      batch_size = batch_size,
      shuffle = True,
      seed = seed)
  </code></pre>
  
  <p>Any idea on what's wrong?</p>