title: What does "shuffle" do in fit_generator in keras?
body: <p>I manually built a data generator that yields a tuple of <code>[input, target]</code> each call. I set my generator to shuffle the training samples every epoch. Then I use <code>fit_generator</code> to call my <code>generator</code>, but confuse at the "shuffle" argument in this function:  </p>
  
  <pre><code>fit_generator(self, generator, steps_per_epoch=None, epochs=1, verbose=1, callbacks=None, validation_data=None, validation_steps=None, class_weight=None, max_queue_size=10, workers=1, use_multiprocessing=False, shuffle=True, initial_epoch=0)
  </code></pre>
  
  <p>From Keras <a href="https://keras.io/models/sequential/#fit_generator" rel="noreferrer">API</a>:</p>
  
  <blockquote>
    <p><strong>shuffle</strong>: Whether to shuffle the order of the batches at the beginning
    of each epoch. Only used with instances of Sequence
    (keras.utils.Sequence)</p>
  </blockquote>
  
  <p>I thought "shuffle" should be the job of the <code>generator</code>. How can it shuffle the order of the batches when my custom <code>generator</code> decides which batch to be output in each iteration?</p>