Module: tff.learning.templates

Libraries of specialized processes used for building learning algorithms.

Classes

class ClientResult: A structure containing the result of ClientWorkProcess.next computation.

class ClientWorkProcess: A stateful process capturing work at clients during learning.

class DistributionProcess: A stateful process that distributes values.

class FinalizerProcess: A stateful process for finalization of a round of training.

class LearningAlgorithmState: A structure representing the state of a learning process.

class LearningProcess: A stateful process for learning tasks that produces metrics.

class LearningProcessOutput: A structure containing the output of a LearningProcess.next computation.

Functions

build_apply_optimizer_finalizer(...): Builds finalizer that applies a step of an optimizer.

build_broadcast_process(...): Builds DistributionProcess directly broadcasting values.

build_functional_model_delta_client_work(...): Creates a ClientWorkProcess for federated averaging.

build_model_delta_client_work(...): Creates a ClientWorkProcess for federated averaging.

compose_learning_process(...): Composes specialized measured processes into a learning process.

reject_non_finite_update(...): Rejects the update if any non-finite value is in the update.