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

tff.federated_mean

tff.federated_mean(
    value,
    weight=None
)

Defined in core/api/intrinsics.py.

Computes a tff.SERVER mean of value placed on tff.CLIENTS.

Args:

  • value: The value of which the mean is to be computed. Must be of a TFF federated type placed at tff.CLIENTS. The value may be structured, e.g., its member constituents can be named tuples. The tensor types that the value is composed of must be floating-point or complex.
  • weight: An optional weight, a TFF federated integer or floating-point tensor value, also placed at tff.CLIENTS.

Returns:

A representation at the tff.SERVER of the mean of the member constituents of value, optionally weighted with weight if specified (otherwise, the member constituents contributed by all clients are equally weighted).

Raises:

  • TypeError: if value is not a federated TFF value placed at tff.CLIENTS, or if weight is not a federated integer or a floating-point tensor with the matching placement.