tensorflow:: ops:: SparseApplyFtrl

#include <training_ops.h>

עדכון ערכים רלוונטיים ב-'*var' בהתאם לסכימה Ftrl-proximal.

תַקצִיר

כלומר, עבור שורות שיש לנו grad עבורן, אנו מעדכנים את var, accum ו-linear באופן הבא:

$$accum_new = accum + grad * grad$$
$$linear += grad + (accum_{new}^{-lr_{power} } - accum^{-lr_{power} } / lr * var$$
$$quadratic = 1.0 / (accum_{new}^{lr_{power} } * lr) + 2 * l2$$
$$var = (sign(linear) * l1 - linear) / quadratic\ if\ |linear| > l1\ else\ 0.0$$
$$accum = accum_{new}$$

טיעונים:

  • היקף: אובייקט היקף
  • var: צריך להיות מתוך Variable().
  • accum: צריך להיות מ-Variable().
  • ליניארי: צריך להיות מ-Variable().
  • גראד: הגרדיאנט.
  • אינדקסים: וקטור של אינדקסים לתוך המימד הראשון של var ו- accum.
  • lr: גורם קנה מידה. חייב להיות סקלרי.
  • l1: רגולריזציה של L1. חייב להיות סקלרי.
  • l2: רגולריזציה של L2. חייב להיות סקלרי.
  • lr_power: גורם קנה מידה. חייב להיות סקלרי.

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

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

החזרות:

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

SparseApplyFtrl (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input linear, :: tensorflow::Input grad, :: tensorflow::Input indices, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input lr_power)
SparseApplyFtrl (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input linear, :: tensorflow::Input grad, :: tensorflow::Input indices, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input lr_power, const SparseApplyFtrl::Attrs & attrs)

מאפיינים ציבוריים

operation
out

תפקידים ציבוריים

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

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

UseLocking (bool x)

מבנים

tensorflow:: ops:: SparseApplyFtrl:: Attrs

קובעי מאפיינים אופציונליים עבור SparseApplyFtrl .

מאפיינים ציבוריים

מִבצָע

Operation operation

הַחוּצָה

::tensorflow::Output out

תפקידים ציבוריים

SparseApplyFtrl

 SparseApplyFtrl(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input linear,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input lr_power
)

SparseApplyFtrl

 SparseApplyFtrl(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input linear,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input lr_power,
  const SparseApplyFtrl::Attrs & attrs
)

צוֹמֶת

::tensorflow::Node * node() const 

אופרטור::tensorflow::קלט

 operator::tensorflow::Input() const 

אופרטור::tensorflow::פלט

 operator::tensorflow::Output() const 

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

שימוש בנעילה

Attrs UseLocking(
  bool x
)