# tf.raw_ops.SparseReduceMax

<br />

Computes the max of elements across dimensions of a SparseTensor.

#### View aliases


**Compat aliases for migration**

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

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

<br />

    tf.raw_ops.SparseReduceMax(
        input_indices,
        input_values,
        input_shape,
        reduction_axes,
        keep_dims=False,
        name=None
    )

This Op takes a SparseTensor and is the sparse counterpart to
[`tf.reduce_max()`](https://www.tensorflow.org/versions/r2.13/api_docs/python/tf/math/reduce_max). In particular, this Op also returns a dense `Tensor`
instead of a sparse one.

Reduces `sp_input` along the dimensions given in `reduction_axes`. Unless
`keep_dims` is true, the rank of the tensor is reduced by 1 for each entry in
`reduction_axes`. If `keep_dims` is true, the reduced dimensions are retained
with length 1.

If `reduction_axes` has no entries, all dimensions are reduced, and a tensor
with a single element is returned. Additionally, the axes can be negative,
which are interpreted according to the indexing rules in Python.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `input_indices` | A `Tensor` of type `int64`. 2-D. `N x R` matrix with the indices of non-empty values in a SparseTensor, possibly not in canonical ordering. |
| `input_values` | A `Tensor`. Must be one of the following types: `float32`, `float64`, `int32`, `uint8`, `int16`, `int8`, `int64`, `bfloat16`, `uint16`, `half`, `uint32`, `uint64`. 1-D. `N` non-empty values corresponding to `input_indices`. |
| `input_shape` | A `Tensor` of type `int64`. 1-D. Shape of the input SparseTensor. |
| `reduction_axes` | A `Tensor` of type `int32`. 1-D. Length-`K` vector containing the reduction axes. |
| `keep_dims` | An optional `bool`. Defaults to `False`. If true, retain reduced dimensions with length 1. |
| `name` | A name for the operation (optional). |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A `Tensor`. Has the same type as `input_values`. ||

<br />