Skip to content

Instantly share code, notes, and snippets.

@ntakouris
Created September 25, 2020 14:54
Show Gist options
  • Save ntakouris/3cd0546fd1b380f30bd8c265789b2ff8 to your computer and use it in GitHub Desktop.
Save ntakouris/3cd0546fd1b380f30bd8c265789b2ff8 to your computer and use it in GitHub Desktop.
dataset = tf.data.Dataset.range(2).interleave(lambda x: tf.data.Dataset.range(x*10, (x+ 1 )* 10))
for t in dataset.take(5):
print(t.numpy())
# 0
# 10
# 1
# 11
# 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment