tensorflow:: אופס:: SparseApplyCenteredRMSProp
#include <training_ops.h>
עדכן את '*var' לפי אלגוריתם RMSProp המרוכז.
תַקצִיר
אלגוריתם ה-RMSProp הממורכז משתמש באומדן של הרגע השני הממורכז (כלומר השונות) לנורמליזציה, בניגוד ל-RMSProp הרגיל, המשתמש ברגע השני (הלא ממורכז). לעתים קרובות זה עוזר באימון, אבל הוא מעט יקר יותר מבחינת חישוב וזיכרון.
שימו לב שביישום צפוף של אלגוריתם זה, mg, ms ו-mom יתעדכנו גם אם הגראד הוא אפס, אבל ביישום הדליל הזה, mg, ms ו-mom לא יתעדכנו באיטרציות שבמהלכן הגראד הוא אפס.
mean_square = decay * mean_square + (1-decay) * gradient ** 2 mean_grad = decay * mean_grad + (1-decay) * gradient Delta = learning_rate * gradient / sqrt(mean_square + epsilon - mean_grad ** 2)
$$ms <- rho * ms_{t-1} + (1-rho) * grad * grad$$ $$mom <- momentum * mom_{t-1} + lr * grad / sqrt(ms + epsilon)$$ $$var <- var - mom$$
טיעונים:
- scope: אובייקט Scope
- var: צריך להיות מ-Variable().
- mg: צריך להיות מ-Variable().
- ms: צריך להיות מ-Variable().
- mom: צריך להיות מ-Variable().
- lr: גורם קנה מידה. חייב להיות סקלר.
- rho: קצב דעיכה. חייב להיות סקלר.
- אפסילון: מונח רכס. חייב להיות סקלר.
- grad: השיפוע.
- אינדקסים: וקטור של מדדים למימד הראשון של var, ms ו-mom.
מאפיינים אופציונליים (ראה Attrs
):
- use_locking: אם
True
, עדכון הטנזורים var, mg, ms ו-mom מוגן על ידי מנעול; אחרת ההתנהגות אינה מוגדרת, אך עלולה להפגין פחות מחלוקת.
החזרות:
-
Output
: זהה ל-"var".
בנאים והורסים | |
---|---|
SparseApplyCenteredRMSProp (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input mg, :: tensorflow::Input ms, :: tensorflow::Input mom, :: tensorflow::Input lr, :: tensorflow::Input rho, :: tensorflow::Input momentum, :: tensorflow::Input epsilon, :: tensorflow::Input grad, :: tensorflow::Input indices) | |
SparseApplyCenteredRMSProp (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input mg, :: tensorflow::Input ms, :: tensorflow::Input mom, :: tensorflow::Input lr, :: tensorflow::Input rho, :: tensorflow::Input momentum, :: tensorflow::Input epsilon, :: tensorflow::Input grad, :: tensorflow::Input indices, const SparseApplyCenteredRMSProp::Attrs & attrs) |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
פונקציות סטטיות ציבוריות | |
---|---|
UseLocking (bool x) |
מבנים | |
---|---|
tensorflow:: ops:: SparseApplyCenteredRMSProp:: Attrs | קובעי תכונות אופציונליים עבור SparseApplyCenteredRMSProp . |
תכונות ציבוריות
מִבצָע
Operation operation
הַחוּצָה
::tensorflow::Output out
תפקידים ציבוריים
SparseApplyCenteredRMSProp
SparseApplyCenteredRMSProp(
const ::tensorflow::Scope & scope,
::tensorflow::Input var,
::tensorflow::Input mg,
::tensorflow::Input ms,
::tensorflow::Input mom,
::tensorflow::Input lr,
::tensorflow::Input rho,
::tensorflow::Input momentum,
::tensorflow::Input epsilon,
::tensorflow::Input grad,
::tensorflow::Input indices
)
SparseApplyCenteredRMSProp
SparseApplyCenteredRMSProp(
const ::tensorflow::Scope & scope,
::tensorflow::Input var,
::tensorflow::Input mg,
::tensorflow::Input ms,
::tensorflow::Input mom,
::tensorflow::Input lr,
::tensorflow::Input rho,
::tensorflow::Input momentum,
::tensorflow::Input epsilon,
::tensorflow::Input grad,
::tensorflow::Input indices,
const SparseApplyCenteredRMSProp::Attrs & attrs
)
צוֹמֶת
::tensorflow::Node * node() const
מפעיל::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
פונקציות סטטיות ציבוריות
השתמש בנעילה
Attrs UseLocking(
bool x
)