Spec-Zone.ru › TensorFlow C++ 2.9

tensorflow::ops::SparseApplyProximalAdagrad

#include <training_ops.h>

Разреженные записи обновления в '*var' и '*accum' в соответствии с алгоритмом FOBOS.

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

Для строк, для которых у нас есть grad, мы обновляем var и accum следующим образом: $$accum += grad * grad$$ $$prox_v = var$$ $$prox_v -= lr * grad * (1 / sqrt(accum))$$ $$var = sign(prox_v)/(1+lr*l2) * max{|prox_v|-lr*l1,0}$$

Аргументы:

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

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

  • use_locking: Если True, обновление тензоров var и accum будет защищено блокировкой; в противном случае поведение не определено, но может быть менее конкурентным.

Возвращает:

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

Дополнительные атрибуты для установки SparseApplyProximalAdagrad.

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

operation

Operation operation

out

::tensorflow::Output out

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

SparseApplyProximalAdagrad

 SparseApplyProximalAdagrad(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices
)

SparseApplyProximalAdagrad

 SparseApplyProximalAdagrad(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  const SparseApplyProximalAdagrad::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
)

© 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/class/tensorflow/ops/sparse-apply-proximal-adagrad

Spec-Zone.ru

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