tensorflow::ops::ResourceSparseApplyProximalAdagrad
#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 будет защищено блокировкой; в противном случае поведение не определено, но может быть меньше конкуренции.
Возвращает:
- созданный
Operation
| Конструкторы и деструкторы | |
|---|---|
ResourceSparseApplyProximalAdagrad(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) | |
ResourceSparseApplyProximalAdagrad(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 ResourceSparseApplyProximalAdagrad::Attrs & attrs) |
| Общедоступные атрибуты | |
|---|---|
operation | |
| Общедоступные функции | |
|---|---|
operator::tensorflow::Operation() const | |
| Общедоступные статические функции | |
|---|---|
UseLocking(bool x) | |
| Структуры | |
|---|---|
| tensorflow::ops::ResourceSparseApplyProximalAdagrad::Attrs | Необязательные атрибуты для установки ResourceSparseApplyProximalAdagrad. |
Общедоступные атрибуты
operation
Operation operation
Общедоступные функции
ResourceSparseApplyProximalAdagrad
ResourceSparseApplyProximalAdagrad( 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 )
ResourceSparseApplyProximalAdagrad
ResourceSparseApplyProximalAdagrad( 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 ResourceSparseApplyProximalAdagrad::Attrs & attrs )
operator::tensorflow::Operation
operator::tensorflow::Operation() const
Общедоступные статические функции
UseLocking
Attrs UseLocking( bool x )
© 2020 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.4/api_docs/cc/class/tensorflow/ops/resource-sparse-apply-proximal-adagrad