Google I/O returns May 18-20! Reserve space and build your schedule Register now


Builds MeasuredProcess for value_type, to be encoded by encoders.

The returned MeasuredProcess has a next function with the TFF type signature:

(<state_type@SERVER, {value_type}@CLIENTS> ->
 <state=state_type@SERVER, result=value_type@SERVER, measurements=()@SERVER>)

value_type The type of values to be encoded by the MeasuredProcess. Either a tff.TensorType or a tff.StructType.
encoders A collection of GatherEncoder objects to be used for encoding values. Must have the same structure as values.

A MeasuredProcess of which next_fn encodes the input at tff.CLIENTS, and computes their sum at tff.SERVER, automatically splitting the decoding part based on its commutativity with sum.

ValueError If value_type and encoders do not have the same structure.
TypeError If encoders are not instances of GatherEncoder, or if value_type are not compatible with the expected input of the encoders.