# tf.compat.v1.ragged.RaggedTensorValue

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/ops/ragged/ragged_tensor_value.py#L24-L114) |

Represents the value of a `RaggedTensor`.

    tf.compat.v1.ragged.RaggedTensorValue(
        values, row_splits
    )

> [!WARNING]
> **Warning:** `RaggedTensorValue` should only be used in graph mode; in eager mode, the [`tf.RaggedTensor`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/RaggedTensor) class contains its value directly.

See [`tf.RaggedTensor`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/RaggedTensor) for a description of ragged tensors.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `values` | A numpy array of any type and shape; or a RaggedTensorValue. |
| `row_splits` | A 1-D int32 or int64 numpy array. |

<br />

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `dtype` | The numpy dtype of values in this tensor. |
| `flat_values` | The innermost `values` array for this ragged tensor value. |
| `nested_row_splits` | The row_splits for all ragged dimensions in this ragged tensor value. |
| `ragged_rank` | The number of ragged dimensions in this ragged tensor value. |
| `row_splits` | The split indices for the ragged tensor value. |
| `shape` | A tuple indicating the shape of this RaggedTensorValue. |
| `values` | The concatenated values for all rows in this tensor. |

<br />

## Methods

### `to_list`

[View source](https://github.com/tensorflow/tensorflow/blob/v2.13.1/tensorflow/python/ops/ragged/ragged_tensor_value.py#L105-L114)

    to_list()

Returns this ragged tensor value as a nested Python list.