tensorflow:: אופס:: SparseApplyProximalAdagrad

#include <training_ops.h>

ערכי עדכון דלילים ב-'*var' ו-'*accum' לפי אלגוריתם FOBOS.

סיכום

כלומר, עבור שורות שיש לנו גראד עבורן, אנו מעדכנים את 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}$$

טיעונים:

  • scope: אובייקט Scope
  • var: צריך להיות מ-Variable().
  • acum: צריך להיות מ-Variable().
  • lr: קצב למידה. חייב להיות סקלר.
  • l1: הסדרת L1. חייב להיות סקלר.
  • l2: הסדרת L2. חייב להיות סקלר.
  • grad: השיפוע.
  • מדדים: וקטור של מדדים למימד הראשון של var ו-acum.

מאפיינים אופציונליים (ראה Attrs ):

  • use_locking: אם נכון, עדכון של הטנזורים var ו-acum יהיה מוגן על ידי מנעול; אחרת ההתנהגות אינה מוגדרת, אך עלולה להפגין פחות מחלוקת.

החזרות:

בנאים והורסים

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

 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 

פונקציות סטטיות ציבוריות

השתמש בנעילה

Attrs UseLocking(
  bool x
)