title: How to concatenate two Tensorflow DataSets?
body: <p>I am trying to load and then augment some image (<code>160 x 160 x 3</code>) dataset, where Images are stored in folder, and folder name is label for me. Multiple transformations are being applied to produce copy of data and they need to be <code>concatenated (or stacked may be)</code> in order to club data and store them back to disk.</p>
  
  <p>Below is simplest reproducible snippet I am able to write, and I am not able to <code>append/concatenate/stack</code> the two dataset.</p>
  
  <pre><code>def some_transformation(image, label):
      # do something like rotation, clipping, noise add etc.
      return image, label
  
  userA = tf.data.Dataset.from_tensors(tf.constant(np.zeros((3, 160, 160, 3))))
  userA_label = tf.data.Dataset.from_tensors(tf.constant(np.zeros((3, 2))))
  userA_with_labels = tf.data.Dataset.zip((userA, userA_label))
  transformed_userA_w_label = userA_with_labels.map(some_transformation)
  
  userB = tf.data.Dataset.from_tensors(tf.constant(np.zeros((3, 160, 160, 3))))
  userB_label = tf.data.Dataset.from_tensors(tf.constant(np.zeros((3, 2))))
  userB_with_labels = tf.data.Dataset.zip((userB, userB_label))
  transformed_userB_w_label = userB_with_labels.map(some_transformation)
  
  print('User A - {}'.format(transformed_userA_w_label))
  print('User B - {}'.format(transformed_userB_w_label))
  transformed_userA_w_label.concatenate(transformed_userB_w_label)
  
  </code></pre>
  
  <p>Output of print statements are as follows:</p>
  
  <pre><code>User A - &lt;MapDataset shapes: ((3, 160, 160, 3), (3, 2)), types: (tf.float64, tf.float64)&gt;
  User B - &lt;MapDataset shapes: ((3, 160, 160, 3), (3, 2)), types: (tf.float64, tf.float64)&gt;
  Output ds - &lt;ConcatenateDataset shapes: ((3, 160, 160, 3), (3, 2)), types: (tf.float64, tf.float64)&gt;
  </code></pre>
  
  <p>Expected: <code>6</code> image</p>
  
  <pre><code>Output ds - &lt;ConcatenateDataset shapes: ((6, 160, 160, 3), (6, 2)), types: (tf.float64, tf.float64)&gt;
  </code></pre>