# tensorflow::ops::ResourceApplyKerasMomentum::Attrs

`#include <training_ops.h>`

Optional attribute setters for [ResourceApplyKerasMomentum](https://www.tensorflow.org/versions/r2.0/api_docs/cc/class/tensorflow/ops/resource-apply-keras-momentum#classtensorflow_1_1ops_1_1_resource_apply_keras_momentum).

## Summary

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/resource-apply-keras-momentum/attrs#structtensorflow_1_1ops_1_1_resource_apply_keras_momentum_1_1_attrs_1a500be603a2bda28a13f6a0839362c8bd = false` | `bool` |
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/resource-apply-keras-momentum/attrs#structtensorflow_1_1ops_1_1_resource_apply_keras_momentum_1_1_attrs_1a4cf8fc79fcfcdfbf2a4790540679ed3b = false` | `bool` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/resource-apply-keras-momentum/attrs#structtensorflow_1_1ops_1_1_resource_apply_keras_momentum_1_1_attrs_1a0623f65e94804dbc056493e451e4995e(bool x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/resource-apply-keras-momentum/attrs#structtensorflow_1_1ops_1_1_resource_apply_keras_momentum_1_1_attrs` If `True`, updating of the var and accum tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention. |
| `https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/resource-apply-keras-momentum/attrs#structtensorflow_1_1ops_1_1_resource_apply_keras_momentum_1_1_attrs_1a99d3ca35a4eff9b9811647223045d412(bool x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r2.0/api_docs/cc/struct/tensorflow/ops/resource-apply-keras-momentum/attrs#structtensorflow_1_1ops_1_1_resource_apply_keras_momentum_1_1_attrs` If `True`, the tensor passed to compute grad will be var + momentum \* accum, so in the end, the var you get is actually var + momentum \* accum. |

## Public attributes

### use_locking_

```
bool tensorflow::ops::ResourceApplyKerasMomentum::Attrs::use_locking_ = false
```

### use_nesterov_

```
bool tensorflow::ops::ResourceApplyKerasMomentum::Attrs::use_nesterov_ = false
```

## Public functions

### UseLocking

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::ResourceApplyKerasMomentum::Attrs::UseLocking(
  bool x
)
```
If `True`, updating of the var and accum tensors will be protected by a lock; otherwise the behavior is undefined, but may exhibit less contention.

Defaults to false

### UseNesterov

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::ResourceApplyKerasMomentum::Attrs::UseNesterov(
  bool x
)
```
If `True`, the tensor passed to compute grad will be var + momentum \* accum, so in the end, the var you get is actually var + momentum \* accum.

Defaults to false