# tensorflow::ops::ApplyMomentum::Attrs

`#include <training_ops.h>`

Optional attribute setters for [ApplyMomentum](https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/apply-momentum#classtensorflow_1_1ops_1_1_apply_momentum).

## Summary

| ### Public attributes ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/apply-momentum/attrs#structtensorflow_1_1ops_1_1_apply_momentum_1_1_attrs_1ac7a1ef7431664860ed9091ad79682048 = false` | `bool` |
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/apply-momentum/attrs#structtensorflow_1_1ops_1_1_apply_momentum_1_1_attrs_1aa220959fe76edba4aee5ab6f50805015 = false` | `bool` |

| ### Public functions ||
|---|---|
| `https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/apply-momentum/attrs#structtensorflow_1_1ops_1_1_apply_momentum_1_1_attrs_1aee05b419c9af98c90acb3eaf340b229f(bool x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/apply-momentum/attrs#structtensorflow_1_1ops_1_1_apply_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/r1.15/api_docs/cc/struct/tensorflow/ops/apply-momentum/attrs#structtensorflow_1_1ops_1_1_apply_momentum_1_1_attrs_1a55fbe297526f05a5ecbcad115457d913(bool x)` | `TF_MUST_USE_RESULT https://www.tensorflow.org/versions/r1.15/api_docs/cc/struct/tensorflow/ops/apply-momentum/attrs#structtensorflow_1_1ops_1_1_apply_momentum_1_1_attrs` If `True`, the tensor passed to compute grad will be var - lr \* momentum \* accum, so in the end, the var you get is actually var - lr \* momentum \* accum. |

## Public attributes

### use_locking_

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

### use_nesterov_

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

## Public functions

### UseLocking

```
TF_MUST_USE_RESULT Attrs tensorflow::ops::ApplyMomentum::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::ApplyMomentum::Attrs::UseNesterov(
  bool x
)
```
If `True`, the tensor passed to compute grad will be var - lr \* momentum \* accum, so in the end, the var you get is actually var - lr \* momentum \* accum.

Defaults to false