Spec-Zone.ru › TensorFlow C++

tensorflow::ops::ResourceSparseApplyKerasMomentum

#include <training_ops.h>

Обновляет соответствующие элементы в '*var' и '*accum' в соответствии со схемой импульса.

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

Установите use_nesterov = True, если хотите использовать импульс Нестерова.

Для строк, для которых имеется градиент, переменные var и accum обновляются следующим образом:

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

Аргументы:

  • scope: объект Scope
  • var: Должен быть получен из Variable().
  • accum: Должен быть получен из Variable().
  • lr: Скорость обучения. Должна быть скалярной величиной.
  • grad: Градиент.
  • indices: Вектор индексов первого измерения var и accum.
  • momentum: Импульс. Должен быть скалярной величиной.

Необязательные атрибуты (см. Attrs):

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

Возвращает:

  • созданный объект Operation
Конструкторы и деструкторы
ResourceSparseApplyKerasMomentum(const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input indices, ::tensorflow::Input momentum)
ResourceSparseApplyKerasMomentum(const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input indices, ::tensorflow::Input momentum, const ResourceSparseApplyKerasMomentum::Attrs & attrs)
Общедоступные атрибуты
operation
Operation
Общедоступные функции
operator::tensorflow::Operation() const
Общедоступные статические функции
UseLocking(bool x)
Attrs
UseNesterov(bool x)
Attrs
Структуры
tensorflow::ops::ResourceSparseApplyKerasMomentum::Attrs

Методы настройки необязательных атрибутов для ResourceSparseApplyKerasMomentum.

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

operation

Operation operation

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

ResourceSparseApplyKerasMomentum

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

ResourceSparseApplyKerasMomentum

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

operator::tensorflow::Operation

operator::tensorflow::Operation() const 

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

UseLocking

Attrs UseLocking(
  bool x
)

UseNesterov

Attrs UseNesterov(
  bool x
)

© 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/api_docs/cc/class/tensorflow/ops/resource-sparse-apply-keras-momentum

Spec-Zone.ru

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