# tensorflow::ops::SparseSplit Class Reference

# tensorflow::
ops::
SparseSplit

`
#include <sparse_ops.h>
`


Split a
`
SparseTensor
`
into
`
num_split
`
tensors along one dimension.

## Summary


If the
`
shape[split_dim]
`
is not an integer multiple of
`
num_split
`
. Slices
`
[0 : shape[split_dim] % num_split]
`
gets one extra dimension. For example, if
`
split_dim = 1
`
and
`
num_split = 2
`
and the input is

```
input_tensor = shape = [2, 7]
[    a   d e  ]
[b c          ]
```

<br />


Graphically the output tensors are:

```
output_tensor[0] = shape = [2, 4]
[    a  ]
[b c    ]

output_tensor[1] = shape = [2, 3]
[ d e  ]
[      ]
```

<br />


Args:

- scope: A [Scope](https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object
- split_dim: 0-D. The dimension along which to split. Must be in the range `
  [0, rank(shape))
  ` .
- indices: 2-D tensor represents the indices of the sparse tensor.
- values: 1-D tensor represents the values of the sparse tensor.
- shape: 1-D. tensor represents the shape of the sparse tensor. output indices: A list of 1-D tensors represents the indices of the output sparse tensors.
- num_split: The number of ways to split.

<br />


Returns:

- `
  OutputList
  ` output_indices
- `
  OutputList
  ` output_values: A list of 1-D tensors represents the values of the output sparse tensors.
- `
  OutputList
  ` output_shape: A list of 1-D tensors represents the shape of the output sparse tensors.

<br />

| ### Constructors and Destructors ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/sparse-split#classtensorflow_1_1ops_1_1_sparse_split_1a321e452a28531c13e1804a67073d0d86 (const :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope & scope, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input split_dim, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input indices, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input values, :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input shape, int64 num_split) ` ||

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/sparse-split#classtensorflow_1_1ops_1_1_sparse_split_1a2974c5fbf83913d7d9f9efaad3748136 ` | ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation ` |
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/sparse-split#classtensorflow_1_1ops_1_1_sparse_split_1aa34695e1d3350589e31496300ce37439 ` | ` :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/group/core#group__core_1gab449e6a3abd500c2f4ea93f9e89ba96c ` |
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/sparse-split#classtensorflow_1_1ops_1_1_sparse_split_1aaadf678ffb2ceae9b4a3a71e743c04e4 ` | ` :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/group/core#group__core_1gab449e6a3abd500c2f4ea93f9e89ba96c ` |
| ` https://www.tensorflow.org/versions/r2.6/api_docs/cc/class/tensorflow/ops/sparse-split#classtensorflow_1_1ops_1_1_sparse_split_1a16af03b2decbe6d8c2b506f3e48dca4a ` | ` :: https://www.tensorflow.org/versions/r2.6/api_docs/cc/group/core#group__core_1gab449e6a3abd500c2f4ea93f9e89ba96c ` |

## Public attributes

### operation

```
Operation operation
```

### output_indices

```
::tensorflow::OutputList output_indices
```

### output_shape

```
::tensorflow::OutputList output_shape
```

### output_values

```
::tensorflow::OutputList output_values
```

## Public functions

### SparseSplit

```
 SparseSplit(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input split_dim,
  ::tensorflow::Input indices,
  ::tensorflow::Input values,
  ::tensorflow::Input shape,
  int64 num_split
)
```