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


Decodes a variant scalar Tensor into an ExtensionType value.

Returns the Tensor components encoded in a CompositeTensorVariant.

Raises an error if type_spec_proto doesn't match the TypeSpec in encoded.

encoded A Tensor of type variant. A scalar variant Tensor containing an encoded ExtensionType value.
metadata A string. String serialization for the TypeSpec. Must be compatible with the TypeSpec contained in encoded. (Note: the encoding for the TypeSpec may change in future versions of TensorFlow.)
Tcomponents A list of tf.DTypes. Expected dtypes for components.
name A name for the operation (optional).

A list of Tensor objects of type Tcomponents.