Group tensors together.
Aliases:
tf.compat.v2.tuple
tf.tuple(
tensors,
control_inputs=None,
name=None
)
This creates a tuple of tensors with the same values as the tensors argument, except that the value of each tensor is only returned after the values of all tensors have been computed.
control_inputs contains additional ops that have to finish before this op finishes, but whose outputs are not returned.
This can be used as a "join" mechanism for parallel computations: all the argument tensors can be computed in parallel, but the values of any tensor returned by tuple are only available after all the parallel computations are done.
tf.groupSee also and tf.control_dependencies.
Args:
tensors: A list ofTensors orIndexedSlices, some entries can beNone.control_inputs: List of additional ops to finish before returning.name: (optional) Anameto use as aname_scope for the operation.
Returns:
Same as tensors.
Raises:
ValueError: Iftensorsdoes not contain anyTensororIndexedSlices.TypeError: Ifcontrol_inputsis not a list ofOperationorTensorobjects.