[tf.data] Add a `Structure._batch()` method for creating structures of batches.
This change switches `Dataset.batch()`, `map_and_batch()`, and `sliding_window_batch()` to use the new helper. As a cascading side effect, all subclasses of `MapDataset` and `FlatMapDataset` are also switched to use `Structure` for representing their structure. PiperOrigin-RevId: 223847841
Loading
Please sign in to comment