[tf.data] Enable Dataset.make_one_shot_iterator() and Dataset.__iter__() in eager...
authorDerek Murray <mrry@google.com>
Mon, 12 Mar 2018 22:40:47 +0000 (15:40 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Mon, 12 Mar 2018 22:44:44 +0000 (15:44 -0700)
commit8b4f7542cee2122eedc398a3d299e47e8f22f615
treef0c22d4935a2fd8e1f1c55d8b4c062b62269c1e2
parentc9956b9b6da05b5acea3f5d528ec5fed29f45092
[tf.data] Enable Dataset.make_one_shot_iterator() and Dataset.__iter__() in eager mode.

This change partially replicates the code in `tf.contrib.eager.Iterator`.
However, since that class depends on contrib-level functionality (viz.
cross-device prefetching support), we cannot move it wholesale to core.

PiperOrigin-RevId: 188790349
tensorflow/contrib/eager/python/datasets.py
tensorflow/contrib/eager/python/datasets_test.py
tensorflow/python/data/ops/BUILD
tensorflow/python/data/ops/dataset_ops.py
tensorflow/python/data/ops/iterator_ops.py