class_docstr: Represents the value of a `RaggedTensor`.
  
  Warning: `RaggedTensorValue` should only be used in graph mode; in
  eager mode, the `tf.RaggedTensor` class contains its value directly.
  
  See `tf.RaggedTensor` for a description of ragged tensors.
class_docstr_tok: ["Represents","the","value","of","a","`","RaggedTensor","`",".","Warning",":","`","RaggedTensorValue","`","should","only","be","used","in","graph","mode",";","in","eager","mode",",","the","`","tf.RaggedTensor","`","class","contains","its","value","directly",".","See","`","tf.RaggedTensor","`","for","a","description","of","ragged","tensors","."]
docstr: Creates a `RaggedTensorValue`.
  
  Args:
    values: A numpy array of any type and shape; or a RaggedTensorValue.
    row_splits: A 1-D int32 or int64 numpy array.
docstr_tok: ["Creates","a","`","RaggedTensorValue","`",".","Args",":","values",":","A","numpy","array","of","any","type","and","shape",";","or","a","RaggedTensorValue",".","row_splits",":","A","1-D","int32","or","int64","numpy","array","."]
code: def __init__(self, values, row_splits):
      """Creates a `RaggedTensorValue`.
  
      Args:
        values: A numpy array of any type and shape; or a RaggedTensorValue.
        row_splits: A 1-D int32 or int64 numpy array.
      """
      if not (
          isinstance(row_splits, (np.ndarray, np.generic))
          and row_splits.dtype in (np.int64, np.int32)
          and row_splits.ndim == 1
      ):
          raise TypeError(
              "row_splits must be a 1D int32 or int64 numpy array"
          )
      if not isinstance(
          values, (np.ndarray, np.generic, RaggedTensorValue)
      ):
          raise TypeError(
              "values must be a numpy array or a RaggedTensorValue"
          )
      if (
          isinstance(values, RaggedTensorValue)
          and row_splits.dtype != values.row_splits.dtype
      ):
          raise ValueError(
              "row_splits and values.row_splits must have "
              "the same dtype"
          )
      self._values = values
      self._row_splits = row_splits
  
file_path: tensorflow-upstream/tensorflow/python/ops/ragged/ragged_tensor_value.py
imports: import numpy
  from tensorflow.python.ops.ragged.row_partition import RowPartition
  from tensorflow.python.util import dispatch
  from tensorflow.python.util.tf_export import tf_export
label_desc: Use image node_id 1 to create a new RaggedTensorValue object  with example: obj = RaggedTensorValue(values, row_splits)