tensorflow::ops::SparseApplyProximalGradientDescent
#include <training_ops.h>
Разреженный обновление '*var*' по алгоритму FOBOS с фиксированной скоростью обучения.
Краткое описание
Для строк, для которых у нас есть grad, мы обновляем var следующим образом:
$$prox_v = var - alpha * grad$$
$$var = sign(prox_v)/(1+alpha*l2) * max{|prox_v|-alpha*l1,0}$$
Аргументы:
- scope: Объект Scope
- var: Должен быть получен из Variable().
- alpha: Коэффициент масштабирования. Должен быть скалярным.
- l1: Регуляризация L1. Должен быть скалярным.
- l2: Регуляризация L2. Должен быть скалярным.
- grad: Градиент.
- indices: Вектор индексов в первом измерении var и accum.
Необязательные атрибуты (см. Attrs):
- use_locking: Если True, вычитание будет защищено блокировкой; в противном случае поведение не определено, но может демонстрировать меньше конкуренции.
Возвращает:
-
Output: Идентично "var".
| Конструкторы и деструкторы | |
|---|---|
SparseApplyProximalGradientDescent(const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input alpha, ::tensorflow::Input l1, ::tensorflow::Input l2, ::tensorflow::Input grad, ::tensorflow::Input indices) | |
SparseApplyProximalGradientDescent(const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input alpha, ::tensorflow::Input l1, ::tensorflow::Input l2, ::tensorflow::Input grad, ::tensorflow::Input indices, const SparseApplyProximalGradientDescent::Attrs & attrs) |
| Общедоступные атрибуты | |
|---|---|
operation | |
out | |
| Общедоступные функции | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Общедоступные статические функции | |
|---|---|
UseLocking(bool x) | |
| Структуры | |
|---|---|
| tensorflow::ops::SparseApplyProximalGradientDescent::Attrs | Необязательные атрибуты-сеттеры для SparseApplyProximalGradientDescent. |
Общедоступные атрибуты
operation
Operation operation
out
::tensorflow::Output out
Общедоступные функции
SparseApplyProximalGradientDescent
SparseApplyProximalGradientDescent( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input alpha, ::tensorflow::Input l1, ::tensorflow::Input l2, ::tensorflow::Input grad, ::tensorflow::Input indices )
SparseApplyProximalGradientDescent
SparseApplyProximalGradientDescent( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input alpha, ::tensorflow::Input l1, ::tensorflow::Input l2, ::tensorflow::Input grad, ::tensorflow::Input indices, const SparseApplyProximalGradientDescent::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 )
© 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/sparse-apply-proximal-gradient-descent