تدفق التوتر:: العمليات:: 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}$$
الحجج:
- النطاق: كائن النطاق
- فار: يجب أن يكون من متغير ().
- ألفا: عامل التحجيم. يجب أن يكون العددية.
- l1: تسوية L1. يجب أن يكون العددية.
- l2: تسوية L2. يجب أن يكون العددية.
- غراد: التدرج.
- المؤشرات: متجه للمؤشرات في البعد الأول من var وaccum.
السمات الاختيارية (انظر Attrs
):
- use_locking: إذا كان True، فسيتم حماية الطرح بواسطة قفل؛ وإلا فإن السلوك غير محدد، ولكنه قد يحمل قدرًا أقل من الخلاف.
العوائد:
-
Output
: نفس "فار".
البنائين والمدمرين | |
---|---|
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) |
الوظائف العامة | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
وظائف ثابتة العامة | |
---|---|
UseLocking (bool x) |
الهياكل | |
---|---|
Tensorflow:: ops:: SparseApplyProximalGradientDescent:: Attrs | محددات السمات الاختيارية لـ SparseApplyProximalGradientDescent . |
الصفات العامة
عملية
Operation operation
خارج
::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 )
العقدة
::tensorflow::Node * node() const
المشغل::tensorflow::الإدخال
operator::tensorflow::Input() const
المشغل::tensorflow::الإخراج
operator::tensorflow::Output() const
وظائف ثابتة العامة
UseLocking
Attrs UseLocking( bool x )