class_docstr: A `Dataset` that splits a rank-N `tf.sparse.SparseTensor` into its rows.
docstr: See `Dataset.from_sparse_tensor_slices()` for details.
code: def __init__(self, sparse_tensor):
      """See `Dataset.from_sparse_tensor_slices()` for details."""
      if not isinstance(sparse_tensor, sparse_tensor_lib.SparseTensor):
          raise TypeError(
              f"Invalid `sparse_tensor`. `sparse_tensor` must be a "
              f"`tf.sparse.SparseTensor`. Got {type(sparse_tensor)}."
          )
      self._sparse_tensor = sparse_tensor
  
      indices_shape = self._sparse_tensor.indices.get_shape()
      shape_shape = self._sparse_tensor.dense_shape.get_shape()
      rank = (indices_shape.dims[1] - 1).merge_with(
          shape_shape.dims[0] - 1
      )
      self._structure = (
          tensor_spec.TensorSpec([None, rank], dtypes.int64),
          tensor_spec.TensorSpec([None], self._sparse_tensor.dtype),
          tensor_spec.TensorSpec([rank], dtypes.int64),
      )
  
      variant_tensor = gen_dataset_ops.sparse_tensor_slice_dataset(
          self._sparse_tensor.indices,
          self._sparse_tensor.values,
          self._sparse_tensor.dense_shape,
      )
      super().__init__(variant_tensor)
  
file_path: tensorflow-upstream/tensorflow/python/data/ops/from_sparse_tensor_slices_op.py
imports: from tensorflow.python.data.ops import dataset_ops
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import sparse_tensor
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.ops import gen_dataset_ops
label_desc: Use image node_id 1 to create a new _SparseTensorSliceDataset object from inherited base classes: dataset_ops with example: obj = _SparseTensorSliceDataset(sparse_tensor)