|View source on GitHub|
Maps a federated value on
tff.CLIENTS pointwise using a mapping function.
tff.federated_map( mapping_fn, value )
Used in the tutorials:
- Custom Federated Algorithms, Part 1: Introduction to the Federated Core
- Custom Federated Algorithms, Part 2: Implementing Federated Averaging
mapping_fn: A mapping function to apply pointwise to member constituents of
valueon each of the participants in
tff.CLIENTS. The parameter of this function must be of the same type as the member constituents of
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.
A federated value on
tff.CLIENTS that represents the result of mapping.
TypeError: If the arguments are not of the appropriate types.