# tf.raw_ops.SetSize

<br />

Number of unique elements along last dimension of input `set`.

#### View aliases


**Compat aliases for migration**

See
[Migration guide](https://www.tensorflow.org/guide/migrate) for
more details.

[`tf.compat.v1.raw_ops.SetSize`](https://www.tensorflow.org/api_docs/python/tf/raw_ops/SetSize)

<br />

    tf.raw_ops.SetSize(
        set_indices, set_values, set_shape, validate_indices=True, name=None
    )

Input `set` is a `SparseTensor` represented by `set_indices`, `set_values`,
and `set_shape`. The last dimension contains values in a set, duplicates are
allowed but ignored.

If `validate_indices` is `True`, this op validates the order and range of `set`
indices. Setting is to `False` while passing invalid arguments results in
undefined behavior.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `set_indices` | A `Tensor` of type `int64`. 2D `Tensor`, indices of a `SparseTensor`. |
| `set_values` | A `Tensor`. Must be one of the following types: `int8`, `int16`, `int32`, `int64`, `uint8`, `uint16`, `string`. 1D `Tensor`, values of a `SparseTensor`. |
| `set_shape` | A `Tensor` of type `int64`. 1D `Tensor`, shape of a `SparseTensor`. |
| `validate_indices` | An optional `bool`. Defaults to `True`. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor` of type `int32`. ||

<br />