TensorFlow 2.0 Beta is available Learn more

tff.framework.transform_type_postorder

Walks type tree of type_signature postorder, calling transform_fn.

tff.framework.transform_type_postorder(
    type_signature,
    transform_fn
)

Defined in python/core/impl/type_utils.py.

Args:

  • type_signature: Instance of computation_types.Type to transform recursively.
  • transform_fn: Transformation function to apply to each node in the type tree of type_signature. Must be instance of Python function type.

Returns:

A possibly transformed version of type_signature, with each node in its tree the result of applying transform_fn to the corresponding node in type_signature.

Raises:

  • TypeError: If the types don't match the specification above.