ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more


Returns the last element of the input list as well as a list with all but that element.

Fails if the list is empty.

input_handle: the input list tensor: the withdrawn last element of the list element_dtype: the type of elements in the list element_shape: the shape of the output tensor

input_handle A Tensor of type variant.
element_shape A Tensor of type int32.
element_dtype A tf.DType.
name A name for the operation (optional).

A tuple of Tensor objects (output_handle, tensor).
output_handle A Tensor of type variant.
tensor A Tensor of type element_dtype.