tff.framework.transform_type_postorder

View source on GitHub

Walks type tree of type_signature postorder, calling transform_fn.

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.

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.

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