# data.Data

``` python
data.Data()
```

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

## Attributes

| Name | Description |
|----|----|
| [n_data](#laplacekit.data.Data.n_data) | The number of examples over all processes. |

## Methods

| Name                                       | Description              |
|--------------------------------------------|--------------------------|
| [**call**](#laplacekit.data.Data.__call__) | The batches of one pass. |

### **call**

``` python
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`. |
