TensorFlow 2.0 Beta is available Learn more

tff.framework.replace_selection_from_tuple_with_element

Replaces any selection from a tuple with the underlying tuple element.

tff.framework.replace_selection_from_tuple_with_element(comp)

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

Replaces any occurences of:

Selection
Tuple | [Comp, Comp, ...]

with the appropriate Comp, as determined by the index or name of the Selection.

Args:

  • comp: The computation building block in which to perform the replacements.

Returns:

A possibly modified version of comp, without any occurrences of selections from tuples.

Raises:

  • TypeError: If comp is not an instance of computation_building_blocks.ComputationBuildingBlock.