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