tff.utils.build_encoded_broadcast_process

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 broadcasted by the MeasuredProcess. Either a tff.TensorType or a tff.StructType.
encoders A collection of SimpleEncoder 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.SERVER, broadcasts the encoded representation and decodes the encoded representation at tff.CLIENTS.

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