title: How do i randomize starting point of tensorflow dataset pipeline
body: <p>I'm building a tf.data input pipeline for timeseries.
  I'd like to start each epoch at a random index within the dataset.
  I can't get that to work though.</p>
  <p>Here's what I tried with a function called random_start():</p>
  <pre><code>def random_start(dataset):
    dataset = dataset[tf.random.uniform(shape=(), minval=1, maxval=5, dtype=tf.int32):]
    return dataset
  
  dataset = tf.data.Dataset.from_tensor_slices(training_data)
  
  dataset = (
      dataset
      .map(random_start)
      # these operations can be ignored for this question:
      .batch(self.data_details.seq_length+1, drop_remainder=True)
      .map(split_input_target)
      .batch(BATCH_SIZE, drop_remainder=True)
      .shuffle(BUFFER_SIZE, reshuffle_each_iteration=True))
  </code></pre>
  <p>when I do</p>
  <pre><code>dataset.as_numpy_iterator.next()
  </code></pre>
  <p>I get that it has nothing to return.</p>