title: How to create train, test and validation splits in tensorflow 2.0
body: <p>I am new to tensorflow, and I have started to use tensorflow 2.0</p>
  
  <p>I have built a tensorflow dataset for a multi-class classification problem. Let's call this <code>labeled_ds</code>. I have prepared this dataset by loading all the image files from their respective class wise directories. I have followed along the tutorial here : <a href="https://www.tensorflow.org/tutorials/load_data/images" rel="noreferrer">tensorflow guide to load image dataset</a></p>
  
  <p>Now, I need to split <code>labeld_ds</code> into three disjoint pieces : train, validation and test. I was going through the tensorflow API, but there was no example which allows to specify the split percentages. I found something in the <a href="https://www.tensorflow.org/datasets/api_docs/python/tfds/load" rel="noreferrer">load method</a>, but I am not sure how to use it. Further, how can I get splits to be stratified ?</p>
  
  <pre><code># labeled_ds contains multi class data, which is unbalanced.
  train_ds, val_ds, test_ds = tf.data.Dataset.tfds.load(labeled_ds, split=["train", "validation", "test"])
  </code></pre>
  
  <p>I am stuck here, would appreciate any advice on how to progress from here. Thanks in advance.</p>