title: tensorflow - Input pipeline with multiple TFRecord files + tf.contrib.data.sliding_window_batch()
body: <p>I have multiple <code>TFRecord</code> files, which all hold a specific timeframe of my data. Containing data points are consecutive inside each file but are not consecutive across files. As part of my input pipeline, i am using <code>tf.contrib.data.sliding_window_batch</code> in order to process a window of data points as following:</p>
  
  <pre><code>filenames = [os.path.join(data_dir, f) for f in os.listdir(data_dir)]
  dataset = tf.data.TFRecordDataset(filenames)
  
  dataset = dataset.map(parser_fn, num_parallel_calls=6)
  dataset = dataset.map(preprocessing_fn, num_parallel_calls=6)
  dataset = dataset.apply(tf.contrib.data.sliding_window_batch(window_size=y + z)) # sliding window
  dataset = dataset.map(lambda x: prepare_fn(x, y, z))
  dataset = dataset.shuffle(buffer_size=100000)
  dataset = dataset.batch(32)
  dataset = dataset.repeat()
  dataset = dataset.prefetch(2)
  </code></pre>
  
  <p>How can i prevent the window to be spanned across data points from different files? </p>