Skip to main content

data.Data

data.Data()

A data source: data(generator) returns the batches of one pass.

Attributes

Name Description
n_data The number of examples over all processes.

Methods

Name Description
call The batches of one pass.

call

data.Data.__call__(generator, /)

The batches of one pass.

Parameters

Name Type Description Default
generator torch.Generator A fresh CPU generator for this pass, for sources that draw random numbers (a shuffle, say). The fit derives it from its seed and the pass number. required

Returns

Name Type Description
Iterable[Batch] The batches, each a Batch.