|TensorFlow 1 version||View source on GitHub|
Represents a ragged tensor.
Compat aliases for migration
See Migration guide for more details.
tf.RaggedTensor( values, row_partition, internal=False )
Used in the notebooks
|Used in the guide||Used in the tutorials|
RaggedTensor is a tensor with one or more ragged dimensions, which are
dimensions whose slices may have different lengths. For example, the inner
(column) dimension of
rt=[[3, 1, 4, 1], , [5, 9, 2], , ] is ragged,
since the column slices (
rt[0, :], ...,
rt[4, :]) have different lengths.
Dimensions whose slices all have the same length are called uniform
dimensions. The outermost dimension of a
RaggedTensor is always uniform,
since it consists of a single slice (and so there is no possibility for
differing slice lengths).
The total number of dimensions in a
RaggedTensor is called its rank,
and the number of ragged dimensions in a
RaggedTensor is called its