# tensorflow::ops::SparseReduceSum::Attrs Struct Reference

# tensorflow::
ops::
SparseReduceSum::
Attrs

`
#include <sparse_ops.h>
`


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

## Summary

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

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

## Public attributes

### keep_dims_

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

## Public functions

### KeepDims

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

If true, retain reduced dimensions with length 1.


Defaults to false