title: TensorFlow TFRecordDataset shuffle buffer_size behavior
body: <p>It's unclear to me what the <code>buffer_size</code> parameter in <a href="https://www.tensorflow.org/api_docs/python/tf/contrib/data/TFRecordDataset#shuffle" rel="nofollow noreferrer">tf.TFRecordDataset</a> does. Let's say we have the following code:</p>
  
  <pre><code>dataset = dataset.shuffle(buffer_size=10000).repeat().batch(batch_size)
  </code></pre>
  
  <p>Does this mean that only the first 10k samples will be used and repeated forever, or will I go through the entire dataset? If not, what does it to exactly? And what about this code?</p>
  
  <pre><code>dataset = dataset.repeat().shuffle(buffer_size=10000).batch(batch_size)
  </code></pre>
  
  <p>I've noticed <a href="https://stackoverflow.com/questions/44132307/tf-contrib-data-dataset-repeat-with-shuffle-notice-epoch-end-mixed-epochs">this post</a>, but it doesn't say anything about <code>buffer_size</code>.</p>