Watch talks from the 2019 TensorFlow Dev Summit Watch now

tff.learning.framework.build_model_delta_optimizer_process

tff.learning.framework.build_model_delta_optimizer_process(
    model_fn,
    model_to_client_delta_fn,
    server_optimizer_fn
)

Defined in learning/framework/optimizer_utils.py.

Constructs tff.utils.IterativeProcess for Federated Averaging or SGD.

This provides the TFF orchestration logic connecting the common server logic which applies aggregated model deltas to the server model with a ClientDeltaFn that specifies how weight_deltas are computed on device.

Args:

  • model_fn: A no-arg function that returns a tff.learning.Model.
  • model_to_client_delta_fn: A function from a model_fn to a ClientDeltaFn.
  • server_optimizer_fn: A no-arg function that returns a tf.Optimizer. The apply_gradients method of this optimizer is used to apply client updates to the server model.

Returns:

A tff.utils.IterativeProcess.