[tf.data] Add new `Optional` type to represent missing data.
The `Optional` type makes it possible to represent missing values (e.g. an attempt to run `Iterator.get_next()` after the sequence has ended) without raising an error. NOTE: The `Optional` type is currently only supported on CPU, and a follow-up change will add support for other devices. After then, we will add this to the `tf.contrib.data` API, with a view to eventually migrating it to core. PiperOrigin-RevId: 207049979
Loading
Please sign in to comment