tf_agents.utils.eager_utils.dataset_iterator

Constructs a Dataset iterator.

The method used to construct the iterator is conditioned on whether Graph mode is enabled. dataset_iterator and get_next are useful when we need to construct an iterator and iterate through it inside a tensorflow.function.

dataset a tf.data.Dataset.

A tf.data.Iterator if Graph mode is enabled; a tf.data.EagerIterator if in eager mode.