# tf.raw_ops.DenseCountSparseOutput

<br />

Performs sparse-output bin counting for a tf.tensor input.

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.raw_ops.DenseCountSparseOutput(
        values, weights, binary_output, minlength=-1, maxlength=-1, name=None
    )

Counts the number of times each value occurs in the input.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `values` | A `Tensor`. Must be one of the following types: `int32`, `int64`. Tensor containing data to count. |
| `weights` | A `Tensor`. Must be one of the following types: `int32`, `int64`, `float32`, `float64`. A Tensor of the same shape as indices containing per-index weight values. May also be the empty tensor if no weights are used. |
| `binary_output` | A `bool`. Whether to output the number of occurrences of each value or 1. |
| `minlength` | An optional `int` that is `>= -1`. Defaults to `-1`. Minimum value to count. Can be set to -1 for no minimum. |
| `maxlength` | An optional `int` that is `>= -1`. Defaults to `-1`. Maximum value to count. Can be set to -1 for no maximum. |
| `name` | A name for the operation (optional). |

<br />

<br />

| ## Returns ||
|---|---|
| A tuple of `Tensor` objects (output_indices, output_values, output_dense_shape). ||
| `output_indices` | A `Tensor` of type `int64`. |
| `output_values` | A `Tensor`. Has the same type as `weights`. |
| `output_dense_shape` | A `Tensor` of type `int64`. |

<br />