Spec-Zone.ru › TensorFlow C++ 1.15

tensorflow::ops::ApplyMomentum

#include <training_ops.h>

Обновить '*var' по схеме импульса.

Краткое описание

Установите use_nesterov = True, если

хотите использовать импульс Нестерова.

accum = accum * momentum + grad var -= lr * accum

Аргументы:

  • scope: Объект Scope
  • var: Должен быть из Variable().
  • accum: Должен быть из Variable().
  • lr: Коэффициент масштабирования. Должен быть скаляром.
  • grad: Градиент.
  • momentum: Импульс. Должен быть скаляром.

Дополнительные атрибуты (см. Attrs):

  • use_locking: Если True, обновление тензоров var и accum будет защищено блокировкой; в противном случае поведение не определено, но может проявлять меньше конкуренции.
  • use_nesterov: Если True, тензор, передаваемый для вычисления grad, будет var - lr * momentum * accum, поэтому в итоге var, который вы получите, фактически будет var - lr * momentum * accum.

Возвращает:

  • Output: То же, что и "var".
Конструкторы и деструкторы
ApplyMomentum(const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input momentum)
ApplyMomentum(const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input momentum, const ApplyMomentum::Attrs & attrs)
Общедоступные атрибуты
operation
Operation
out
::tensorflow::Output
Общедоступные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Общедоступные статические функции
UseLocking(bool x)
Attrs
UseNesterov(bool x)
Attrs
Структуры
tensorflow::ops::ApplyMomentum::Attrs

Дополнительные атрибуты для ApplyMomentum.

Общедоступные атрибуты

operation

Operation operation

out

::tensorflow::Output out

Общедоступные функции

ApplyMomentum

 ApplyMomentum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input momentum
)

ApplyMomentum

 ApplyMomentum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input momentum,
  const ApplyMomentum::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

Общедоступные статические функции

UseLocking

Attrs UseLocking(
  bool x
)

UseNesterov

Attrs UseNesterov(
  bool x
)

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r1.15/api_docs/cc/class/tensorflow/ops/apply-momentum

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API