Constructs tff.backends.mapreduce.CanonicalForm
given iterative process.
tff.backends.mapreduce.get_canonical_form_for_iterative_process(
ip: tff.templates.IterativeProcess
,
grappler_config: Optional[tf.compat.v1.ConfigProto] = _GRAPPLER_DEFAULT_CONFIG
) -> tff.backends.mapreduce.CanonicalForm
Args |
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.
|
Raises |
TypeError
|
If the arguments are of the wrong types.
|
transformations.CanonicalFormCompilationError
|
If the compilation
process fails.
|