description: Returns a tf.experimental.Optional with the next element of the iterator. (deprecated)

tf.data.experimental.get_next_as_optional

Returns a tf.experimental.Optional with the next element of the iterator. (deprecated)

Warning: THIS FUNCTION IS DEPRECATED. It will be removed in a future version. Instructions for updating: Use tf.data.Iterator.get_next_as_optional() instead.

If the iterator has reached the end of the sequence, the returned tf.experimental.Optional will have no value.

iterator A tf.data.Iterator.

A tf.experimental.Optional object which either contains the next element of the iterator (if it exists) or no value.