tff.backends.mapreduce.get_canonical_form_for_iterative_process

Constructs tff.backends.mapreduce.CanonicalForm given iterative process.

ip An instance of tff.templates.IterativeProcess that is compatible with canonical form. Iterative processes are only compatible if initialize_fn returns a single federated value placed at SERVER and next takes exactly two arguments. The first must be the state value placed at SERVER. - next returns exactly two values.
grappler_config An optional instance of tf.compat.v1.ConfigProto to configure Grappler graph optimization of the TensorFlow graphs backing the resulting tff.backends.mapreduce.CanonicalForm. These options are combined with a set of defaults that aggressively configure Grappler. If None, Grappler is bypassed.

An instance of tff.backends.mapreduce.CanonicalForm equivalent to the provided tff.templates.IterativeProcess.

TypeError If the arguments are of the wrong types.
transformations.CanonicalFormCompilationError If the compilation process fails.