Missed TensorFlow World? Check out the recap. Learn more

tff.simulation.datasets.build_synthethic_iid_datasets

View source on GitHub

Constructs an iterable of IID clients from a tf.data.Dataset.

tff.simulation.datasets.build_synthethic_iid_datasets(
    client_data,
    client_dataset_size
)

The returned iterator yields a stream of tf.data.Datsets that approximates the true statistical IID setting with the entirety of client_data representing the global distribution. That is, we do not simply randomly distribute the data across some fixed number of clients, instead each dataset returned by the iterator samples independently from the entirety of client_data (so any example in client_data may be produced by any client).

Args:

Returns:

A tf.data.Dataset instance that yields iid client datasets sampled from

the global distribution.