Missed TensorFlow World? Check out the recap. Learn more

tff.framework.transform_type_postorder

View source on GitHub

Walks type tree of type_signature postorder, calling transform_fn.

tff.framework.transform_type_postorder(
    type_signature,
    transform_fn
)

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.