tf.data.experimental.get_next_as_optional
View source on GitHub |
Returns a tf.experimental.Optional
with the next element of the iterator. (deprecated)
tf.data.experimental.get_next_as_optional( iterator )
If the iterator has reached the end of the sequence, the returned tf.experimental.Optional
will have no value.
Args | |
---|---|
iterator | A tf.data.Iterator . |
Returns | |
---|---|
A tf.experimental.Optional object which either contains the next element of the iterator (if it exists) or no value. |
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.4/api_docs/python/tf/data/experimental/get_next_as_optional