# tensorflow::ops::SparseReduceMaxSparse::Attrs Struct Reference

# tensorflow::
ops::
SparseReduceMaxSparse::
Attrs

`
#include <sparse_ops.h>
`


Optional attribute setters for
[SparseReduceMaxSparse](https://www.tensorflow.org/versions/r2.5/api_docs/cc/class/tensorflow/ops/sparse-reduce-max-sparse#classtensorflow_1_1ops_1_1_sparse_reduce_max_sparse)
.

## Summary

| ### Public attributes ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/sparse-reduce-max-sparse/attrs#structtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1_1_attrs_1a5f44da89bb2df6c91247f9ea87b51a39 = false ` | ` bool ` |

| ### Public functions ||
|---|---|
| ` https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/sparse-reduce-max-sparse/attrs#structtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1_1_attrs_1aa62d1fdad9596946ba2e6cb122c8dafa (bool x) ` | ` TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.5/api_docs/cc/struct/tensorflow/ops/sparse-reduce-max-sparse/attrs#structtensorflow_1_1ops_1_1_sparse_reduce_max_sparse_1_1_attrs ` If true, retain reduced dimensions with length 1. |

## Public attributes

### keep_dims_

```
bool tensorflow::ops::SparseReduceMaxSparse::Attrs::keep_dims_ = false
```

## Public functions

### KeepDims

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::SparseReduceMaxSparse::Attrs::KeepDims(
  bool x
)
```

If true, retain reduced dimensions with length 1.


Defaults to false