tff.program.DatasetDataSource

A tff.program.FederatedDataSource backed by tf.data.Datasets.

Inherits From: FederatedDataSource

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.

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.

ValueError If datasets is empty or if each tf.data.Dataset in datasets does not have the same type specification.

federated_type The type of the data returned by calling select on an iterator.

Methods

iterator

View source

Returns a new iterator for retrieving datasets from this data source.