View source on GitHub |
Constructs a Dataset
iterator.
tf_agents.utils.eager_utils.dataset_iterator(
dataset
)
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
.
Args | |
---|---|
dataset
|
a tf.data.Dataset .
|
Returns | |
---|---|
A tf.data.Iterator if Graph mode is enabled; a tf.data.EagerIterator if
in eager mode.
|