Missed TensorFlow World? Check out the recap. Learn more

Module: tff.learning.framework

View source on GitHub

The public API for contributors who develop federated learning algorithms.

Classes

class ClientDeltaFn: Represents a client computation that produces an update to a model.

class ClientOutput: Structure for outputs returned from clients during federated optimization.

class EnhancedModel: A wrapper around a Model that adds sanity checking and metadata helpers.

class EnhancedTrainableModel: A wrapper around a Model that adds sanity checking and metadata helpers.

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

Functions

build_encoded_broadcast_from_model(...): Builds StatefulBroadcastFn for weights of model returned by model_fn.

build_encoded_mean_from_model(...): Builds StatefulAggregateFn for weights of model returned by model_fn.

build_encoded_sum_from_model(...): Builds StatefulAggregateFn for weights of model returned by model_fn.

build_model_delta_optimizer_process(...): Constructs tff.utils.IterativeProcess for Federated Averaging or SGD.

build_stateless_broadcaster(...): Just tff.federated_broadcast with empty state, to use as a default.

enhance(...): Wraps a tff.learning.Model as an EnhancedModel.