# tensorflow::ops::SparseReduceSumSparse::Attrs Struct Reference

# tensorflow::
ops::
SparseReduceSumSparse::
Attrs

`
#include <sparse_ops.h>
`


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

## Summary

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

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

## Public attributes

### keep_dims_

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

## Public functions

### KeepDims

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

If true, retain reduced dimensions with length 1.


Defaults to false