# tensorflow::ops::TopK::Attrs

`#include <nn_ops.h>`

Optional attribute setters for [TopK](https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/top-k#classtensorflow_1_1ops_1_1_top_k).

## Summary

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/top-k/attrs#structtensorflow_1_1ops_1_1_top_k_1_1_attrs_1abbbe7daa73e35807a6e801d71818d7d6 = true` | `bool` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/top-k/attrs#structtensorflow_1_1ops_1_1_top_k_1_1_attrs_1ae56fc99e004be4f8fc11ecaefb1bedc4(bool x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/top-k/attrs#structtensorflow_1_1ops_1_1_top_k_1_1_attrs` If true the resulting `k` elements will be sorted by the values in descending order. |

## Public attributes

### sorted_

```
bool tensorflow::ops::TopK::Attrs::sorted_ = true
```

## Public functions

### Sorted

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::TopK::Attrs::Sorted(
  bool x
)
```
If true the resulting `k` elements will be sorted by the values in descending order.

Defaults to true