View source on GitHub |
A tff.program.FederatedDataSource
backed by tf.data.Dataset
s.
Inherits From: FederatedDataSource
tff.program.DatasetDataSource(
datasets: Sequence[tf.data.Dataset]
)
A tff.program.FederatedDataSource
backed by a sequence of
tf.data.Dataset's, one
tf.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 each tf.data.Dataset' must have
the same type specification.
|
Raises | |
---|---|
ValueError
|
If datasets is empty or if each tf.data.Dataset in
datasets does not have the same type specification.
|
Attributes | |
---|---|
federated_type
|
The type of the data returned by calling select on an iterator.
|
Methods
iterator
iterator() -> tff.program.DatasetDataSourceIterator
Returns a new iterator for retrieving datasets from this data source.