tensorflow:: אופס:: ResourceSparseApplyFtrl
#include <training_ops.h>
עדכן את הערכים הרלוונטיים ב-'*var' בהתאם לתוכנית ה-Ftrl-proximal.
תַקצִיר
כלומר עבור שורות שיש לנו גראד עבורן, אנו מעדכנים var, accum וליניארי באופן הבא: accum_new = accum + grad * grad linear += grad - (accum_new^(-lr_power) - accum^(-lr_power)) / lr * var ריבועי = 1.0 / (accum_new^(lr_power) * lr) + 2 * l2 var = (סימן (ליניארי) * l1 - ליניארי) / ריבועי אם |ליניארי| > l1 אחר 0.0 accum = accum_new
טיעונים:
- scope: אובייקט Scope
- var: צריך להיות מ-Variable().
- acum: צריך להיות ממשתנה().
- ליניארי: צריך להיות ממשתנה().
- grad: השיפוע.
- מדדים: וקטור של מדדים למימד הראשון של var ו-acum.
- lr: גורם קנה מידה. חייב להיות סקלר.
- l1: הסדרת L1. חייב להיות סקלר.
- l2: הסדרת L2. חייב להיות סקלר.
- lr_power: גורם קנה מידה. חייב להיות סקלר.
מאפיינים אופציונליים (ראה Attrs
):
- use_locking: אם
True
, עדכון של טנסור ה-var ו-acum יהיה מוגן על ידי מנעול; אחרת ההתנהגות אינה מוגדרת, אך עלולה להפגין פחות מחלוקת.
החזרות:
-
Operation
שנוצר
בנאים והורסים | |
---|---|
ResourceSparseApplyFtrl (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) | |
ResourceSparseApplyFtrl (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 ResourceSparseApplyFtrl::Attrs & attrs) |
תפקידים ציבוריים | |
---|---|
operator::tensorflow::Operation () const |
פונקציות סטטיות ציבוריות | |
---|---|
UseLocking (bool x) |
מבנים | |
---|---|
tensorflow:: ops:: ResourceSparseApplyFtrl:: Attrs | קובעי תכונות אופציונליים עבור ResourceSparseApplyFtrl . |
תכונות ציבוריות
מִבצָע
Operation operation
תפקידים ציבוריים
ResourceSparseApplyFtrl
ResourceSparseApplyFtrl( 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 )
ResourceSparseApplyFtrl
ResourceSparseApplyFtrl( 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 ResourceSparseApplyFtrl::Attrs & attrs )
אופרטור::tensorflow::פעולה
operator::tensorflow::Operation() const
פונקציות סטטיות ציבוריות
השתמש בנעילה
Attrs UseLocking( bool x )