tff.learning.framework.ClientDeltaFn

View source on GitHub

Represents a client computation that produces an update to a model.

variables Returns all the variables of this object.

Note this only includes variables that are part of the state of this object, and not the model variables themselves.

Methods

__call__

View source

Defines the complete client computation.

Typically implementations should be decorated with tf.function.

Args
dataset A tf.data.Dataset producing batches than can be fed to tff.learning.Model.forward_pass.
initial_weights A dictionary of initial values for all trainable and non-trainable model variables, keyed by name. This will be supplied by the server in Federated Averaging.

Returns
An optimizer_utils.ClientOutput namedtuple.