tensorflow::ops::ResourceApplyKerasMomentum::Attrs

#include <training_ops.h>

Optional attribute setters for ResourceApplyKerasMomentum.

Summary

Public attributes
use_locking_ = false
bool
use_nesterov_ = false
bool
Public functions
UseLocking(bool x)
TF_MUST_USE_RESULT 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.
UseNesterov(bool x)
TF_MUST_USE_RESULT 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

© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.9/api_docs/cc/struct/tensorflow/ops/resource-apply-keras-momentum/attrs