tensorflow:: ops:: ResourceSparseApplyFtrl
#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 יהיה מוגן על ידי נעילה; אחרת ההתנהגות אינה מוגדרת, אך עשויה להפגין פחות תחרות.
החזרות:
-
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) |
מאפיינים ציבוריים | |
|---|---|
operation | |
תפקידים ציבוריים | |
|---|---|
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::Operation
operator::tensorflow::Operation() const
פונקציות סטטיות ציבוריות
שימוש בנעילה
Attrs UseLocking( bool x )
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2026-11-05 (שעון UTC).