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

tff.federated_map

View source

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

tff.federated_map(
    mapping_fn,
    value
)

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.