TensorFlow 2.0 Beta is available Learn more

Module: tff.simulation

The public API for experimenters running federated learning simulations.

Defined in python/simulation/__init__.py.


datasets module: Datasets for running Federated Learning experiments in simulation.


class ClientData: Object to hold a dataset and a mapping of clients to examples.

class FilePerUserClientData: A tf.simulation.ClientData that maps a set of files to a dataset.

class FromTensorSlicesClientData: ClientData based on tf.data.Dataset.from_tensor_slices.

class HDF5ClientData: A tff.simulation.ClientData backed by an HDF5 file.

class TransformingClientData: Transforms client data, potentially expanding by adding pseudo-clients.