tff.federated_map

tff.federated_map(
    mapping_fn,
    value
)

Defined in core/api/intrinsics.py.

Maps a federated value on tff.CLIENTS pointwise using a mapping function.

Args:

  • mapping_fn: A mapping function to apply pointwise to member constituents of value on each of the participants in tff.CLIENTS. The parameter of this function must be of the same type as the member constituents of value.
  • value: A value of a TFF federated type placed at the tff.CLIENTS, or a value that can be implicitly converted into a TFF federated type, e.g., by zipping.

Returns:

A federated value on tff.CLIENTS that represents the result of mapping.

Raises:

  • TypeError: If the arguments are not of the appropriate types.