نشكرك على متابعة Google I / O. عرض جميع الجلسات عند الطلب مشاهدة عند الطلب

تينسورفلو :: العمليات :: متفرقة

#include <training_ops.h>

إدخالات تحديث متفرقة في "* var" و "* تراكم" وفقًا لخوارزمية FOBOS.

ملخص

هذا بالنسبة للصفوف التي لدينا grad لها ، نقوم بتحديث var وتجميعها على النحو التالي: $$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}$$

الحجج:

  • النطاق: كائن النطاق
  • var: يجب أن يكون من متغير ().
  • تراكم: يجب أن يكون من المتغير ().
  • lr: معدل التعلم. يجب أن يكون عددًا.
  • l1: تسوية L1. يجب أن يكون عددًا.
  • l2: تسوية L2. يجب أن يكون عددًا.
  • غراد: التدرج.
  • المؤشرات: متجه من المؤشرات في البعد الأول من var و stack.

السمات الاختيارية (انظر Attrs ):

  • use_locking: إذا كان هذا صحيحًا ، فسيتم حماية تحديث التنسورات 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
out

الوظائف العامة

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(
  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
)

العقدة

::tensorflow::Node * node() const 

المشغل :: tensorflow :: الإدخال

 operator::tensorflow::Input() const 

المشغل :: Tensorflow :: Output

 operator::tensorflow::Output() const 

وظائف ثابتة عامة

UseLocking

Attrs UseLocking(
  bool x
)