title: Understanding the TfRecordDataset map function in more detail
body: <p>I am reading my <code>TfRecordData</code> like this:</p>
  
  <pre><code>dataset = tf.data.TFRecordDataset(filenames)
  dataset = dataset.map(_parse_function)
  
  def _parse_function(example_proto):
  
      features = {
          'data':         tf.VarLenFeature(tf.float32),
          'label':        tf.VarLenFeature(tf.float32),
          'resolution':   tf.FixedLenFeature([], tf.int64)
      }
  
      parsed_features = tf.parse_single_example(example_proto, features)
  
      resolution = tf.cast(parsed_features['resolution'], tf.int32)
      tensor_feature1 = tf.sparse_tensor_to_dense(parsed_features['data'])
      tensor_feature2 = tf.sparse_tensor_to_dense(parsed_features['label'])
      ...
  
      input = tf.reshape(tensor_feature1, [1, 256, 256])
      output = tf.reshape(tensor_feature2, [1, 256, 256])
  
      return input, output
  </code></pre>
  
  <p>Here I can only parse a single feature at once. Is it possible to concatenate my features in order to stack the input samples somehow like this:</p>
  
  <pre><code>for i in range(0,20)
      parsed_features = tf.parse_single_example(example_proto, features)
      tensor_feature1 = tf.sparse_tensor_to_dense(parsed_features['data'])
  
      inputs = tf.stack(tensor_feature1, axis=0) # shape = [20, 256, 256]
  return inputs, output
  </code></pre>
  
  <p>** EDIT **</p>
  
  <p>I made progress:</p>
  
  <pre><code>datasets = []
  
  for idx in range(20):
      dataset = tf.data.TFRecordDataset(filenames, 'GZIP')
      dataset = dataset.skip(idx)
      dataset = dataset.map(_parse_function, num_parallel_calls=tf.constant(FLAGS.num_parallel_calls, dtype=tf.int32))
      dataset = dataset.batch(20)
      datasets.append(dataset)
  </code></pre>
  
  <p>Since batch only gives me consecutive batches I used <code>.skip(idx)</code> in hope to offset my starting point in order to sth like:</p>
  
  <pre><code>[1,2,3,4,5] --&gt; [1,2][2,3][3,4] rather than: [1,2][3,4]
  </code></pre>
  
  <p>I am not sure whether this is correct tho. The only problem now is: I also load 20 outputs rather than just one output. I was thinking of using <code>zip</code> but for now I could not get it done.</p>