Skip to content

Instantly share code, notes, and snippets.

@skeggse
Created February 27, 2018 21:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skeggse/1da719766772da217451a64fc20b1983 to your computer and use it in GitHub Desktop.
Save skeggse/1da719766772da217451a64fc20b1983 to your computer and use it in GitHub Desktop.
import tensorflow as tf
dataset = tf.data.Dataset.from_generator(lambda: None, tf.float32)
# raises no errors
dataset.map(lambda i: (i, tf.zeros(tf.float32)))
zeros = tf.zeros(tf.float32)
# raises KeyError: 'zeros:0'
dataset.map(lambda i: (i, zeros))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment