Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tff.learning.framework.ClientDeltaFn

View source

Class ClientDeltaFn

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

Properties

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.

Returns:

An iterable of tf.Variable objects.

Methods

__call__

View source

__call__(
    dataset,
    initial_weights
)

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.