Module: tf.ragged

Ragged Tensors.

This package defines ops for manipulating ragged tensors (tf.RaggedTensor), which are tensors with non-uniform shapes. In particular, each RaggedTensor has 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], [6], []] is ragged, since the column slices (rt[0, :], ..., rt[4, :]) have different lengths. For a more detailed description of ragged tensors, see the tf.RaggedTensor class documentation and the Ragged Tensor Guide.

Additional ops that support RaggedTensor


class RaggedTensorValue: Represents the value of a RaggedTensor.


constant(...): Constructs a constant RaggedTensor from a nested Python list.

constant_value(...): Constructs a RaggedTensorValue from a nested Python list.

map_flat_values(...): Applies op to the values of one or more RaggedTensors.

range(...): Returns a RaggedTensor containing the specified sequences of numbers.

row_splits_to_segment_ids(...): Generates the segmentation corresponding to a RaggedTensor row_splits.

segment_ids_to_row_splits(...): Generates the RaggedTensor row_splits corresponding to a segmentation.