Module: tff.learning

The public API for model developers using federated learning algorithms.


framework module: The public API for contributors who develop federated learning algorithms.


class BatchOutput: A structure that holds the output of a tff.learning.Model.

class ClientFedAvg: Client TensorFlow logic for Federated Averaging.

class Model: Represents a model for use in TensorFlow Federated.

class ModelWeights: A container for the trainable and non-trainable variables of a Model.


assign_weights_to_keras_model(...): Assigns a nested structure of TFF weights to a Keras model.

build_federated_averaging_process(...): Builds an iterative process that performs federated averaging.

build_federated_evaluation(...): Builds the TFF computation for federated evaluation of the given model.

build_federated_sgd_process(...): Builds the TFF computations for optimization using federated SGD.

build_personalization_eval(...): Builds the TFF computation for evaluating personalization strategies.

from_keras_model(...): Builds a tff.learning.Model for a given input type.

state_with_new_model_weights(...): Returns a ServerState with updated model weights.