How Can I Use Tf.data Datasets In Eager Execution Mode?
In the tf.data talk at the TensorFlow Dev Summit 2018, Derek Murray presented a way to combine the tf.data API with TensorFlow's eager execution mode (at 10:54). I tried out a simp
Solution 1:
make_one_shot_iterator()
should work in TensorFlow 1.8, but for now (i.e., for TensorFlow 1.7), do the following:
import tensorflow.contrib.eager as tfe
dataset = tf.data.Dataset.from_tensor_slices(tf.random_uniform([50, 10]))
dataset = dataset.batch(5)
for batch in tfe.Iterator(dataset):
print(batch)
Post a Comment for "How Can I Use Tf.data Datasets In Eager Execution Mode?"