dataset_batch groups individual elements from a dataset into fixed-size batches, preparing data for efficient model processing. section 8.2.4
Batch sequential samples
dataset <- tensor_slices_dataset(example_array) batched_dataset <- dataset |> dataset_batch(3) Each yielded element now has shape (3, 6): three samples grouped together, rather than one sample with shape (6). section 8.2.4
