Commit a4612992 authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

[tf.data] Remove `tf.data.Iterator` from the V2 API.

In TensorFlow 2.0, iterating over a `tf.data.Dataset` is possible using a
standard Python for loop:

```python
dataset = tf.data.Dataset.from_tensor_slices((features, labels)).batch(bs)
for feature_batch, label_batch in dataset:
  # Train on one minibatch.
```

Since eager execution allows iterators to be created and bound to computation
dynamically, there is no need for the concepts of "one-shot", "initializable",
"feedable", and "reinitializable" iterators. This change is a step towards
simplifying the `tf.data` API.

PiperOrigin-RevId: 223081239
parent 8bf4052f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment