Apply to speak at TensorFlow World. Deadline April 23rd. Propose talk

tff.learning.build_federated_sgd_process

tff.learning.build_federated_sgd_process(
    model_fn,
    server_optimizer_fn=(lambda : gradient_descent.SGD(learning_rate=0.1)),
    client_weight_fn=None
)

Defined in learning/federated_sgd.py.

Builds the TFF computations for optimization using federated SGD.

Args:

  • model_fn: A no-arg function that returns a tff.learning.TrainableModel.
  • 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.
  • client_weight_fn: Optional function that takes the output of model.report_local_outputs and returns a tensor that provides the weight in the federated average of model deltas. If not provided, the default is the total number of examples processed on device.

Returns:

A tff.utils.IterativeProcess.