Weird example of batching in Dataset.map document

By default, map requires an input one 1 example and to output 1 example.

But a batched map can take a input batch of size N and output a batch of size M.
The code you provided indeed returns a batch with more examples than the input.

1 Like