|  View source on GitHub | 
A tff.program.FederatedDataSource backed by tf.data.Datasets.
Inherits From: FederatedDataSource
tff.program.DatasetDataSource(
    datasets: Sequence[tf.data.Dataset]
)
A tff.program.FederatedDataSource backed by a sequence of
tf.data.Dataset's, onetf.data.Dataset' per client, and selects data
uniformly random with replacement.
| Args | |
|---|---|
| datasets | A sequence of tf.data.Dataset's to use to yield the data from
this data source. Must not be empty and eachtf.data.Dataset' must have
the same type specification. | 
| Raises | |
|---|---|
| ValueError | If datasetsis empty or if eachtf.data.Datasetindatasetsdoes not have the same type specification. | 
| Attributes | |
|---|---|
| federated_type | The type of the data returned by calling selecton an iterator. | 
Methods
iterator
iterator() -> tff.program.DatasetDataSourceIterator
Returns a new iterator for retrieving datasets from this data source.