PythonDatasets
Dataset
_batch_examples()
Generator that yields batches of examples for efficient memory usage.
Works with any iterable including generators, consuming only batch_size items at a time.
def _batch_examples(examples, batch_size=100) -> Iterator[List[Example]]:Parameters
examples
required:Iterable[Example]
batch_size
:int
Default:
100
Returns
Iterator[List[Example]]