זרימת טנסור :: אופ :: ResourceSparseApplyFtrlV2
#include <training_ops.h>
עדכן ערכים רלוונטיים ב- '* var' בהתאם לתכנית Ftrl-proximal.
סיכום
כלומר עבור שורות שיש לנו דרגה עבורן, אנו מעדכנים var, accum ו- linear כדלקמן: grad_with_shrinkage = grad + 2 * l2_shrinkage * var accum_new = accum + grad_with_shrinkage * grad_with_shrinkage linear + = grad_with_shrinkage + (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 | ליניארי | > l1 אחר 0.0 accum = accum_new
טענות:
- היקף: אובייקט Scope
- var: צריך להיות מתוך משתנה ().
- accum: צריך להיות מתוך משתנה ().
- לינארי: צריך להיות מתוך משתנה ().
- דרגה: השיפוע.
- מדדים: וקטור של מדדים למימד הראשון של var ו- accum.
- lr: גורם קנה מידה. חייב להיות סקלרי.
- l1: ויסות L1. חייב להיות סקלרי.
- l2: ויסות הצטמקות L2. חייב להיות סקלרי.
- lr_power: גורם שינוי גודל. חייב להיות סקלרי.
תכונות אופציונליות (ראה Attrs
):
- use_locking: אם
True
, עדכון של טנסורים var ו- varum יהיה מוגן על ידי מנעול; אחרת ההתנהגות אינה מוגדרת, אך עשויה להפגין פחות מחלוקת.
החזרות:
-
Operation
שנוצר
קונסטרוקטורים ומשחתנים | |
---|---|
ResourceSparseApplyFtrlV2 (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 l2_shrinkage, :: tensorflow::Input lr_power) | |
ResourceSparseApplyFtrlV2 (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 l2_shrinkage, :: tensorflow::Input lr_power, const ResourceSparseApplyFtrlV2::Attrs & attrs) |
תכונות ציבוריות | |
---|---|
operation |
פונקציות ציבוריות | |
---|---|
operator::tensorflow::Operation () const |
פונקציות סטטיות ציבוריות | |
---|---|
UseLocking (bool x) |
סטרוקטורים | |
---|---|
tensorflow :: ops :: ResourceSparseApplyFtrlV2 :: Attrs | קובעי תכונות אופציונליים עבור ResourceSparseApplyFtrlV2 . |
תכונות ציבוריות
מבצע
Operation operation
פונקציות ציבוריות
ResourceSparseApplyFtrlV2
ResourceSparseApplyFtrlV2( 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 l2_shrinkage, ::tensorflow::Input lr_power )
ResourceSparseApplyFtrlV2
ResourceSparseApplyFtrlV2( 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 l2_shrinkage, ::tensorflow::Input lr_power, const ResourceSparseApplyFtrlV2::Attrs & attrs )
מפעיל :: זרימת tensor :: פעולה
operator::tensorflow::Operation() const
פונקציות סטטיות ציבוריות
UseLocking
Attrs UseLocking( bool x )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2020-04-20 (שעון UTC).