tensorflow:: אופס:: ResourceApplyMomentum
#include <training_ops.h>
עדכן את '*var' לפי סכימת המומנטום.
תַקצִיר
הגדר use_nesterov = נכון אם אתה
רוצה להשתמש במומנטום נסטרוב.
accum = accum * מומנטום + grad var -= lr * accum
טיעונים:
- scope: אובייקט Scope
- var: צריך להיות מ-Variable().
- acum: צריך להיות ממשתנה().
- lr: גורם קנה מידה. חייב להיות סקלר.
- grad: השיפוע.
- מומנטום: מומנטום. חייב להיות סקלר.
מאפיינים אופציונליים (ראה Attrs
):
- use_locking: אם
True
, עדכון של טנסור ה-var ו-acum יהיה מוגן על ידי מנעול; אחרת ההתנהגות אינה מוגדרת, אך עלולה להפגין פחות מחלוקת. - use_nesterov: אם
True
, הטנזור שיעבור לחישוב גראד יהיה var - lr * מומנטום * accum, אז בסופו של דבר, ה- var שתקבל הוא למעשה var - lr * מומנטום * accum.
החזרות:
-
Operation
שנוצר
בנאים והורסים | |
---|---|
ResourceApplyMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum) | |
ResourceApplyMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum, const ResourceApplyMomentum::Attrs & attrs) |
תפקידים ציבוריים | |
---|---|
operator::tensorflow::Operation () const |
פונקציות סטטיות ציבוריות | |
---|---|
UseLocking (bool x) | |
UseNesterov (bool x) |
מבנים | |
---|---|
tensorflow:: ops:: ResourceApplyMomentum:: Attrs | קובעי תכונות אופציונליים עבור ResourceApplyMomentum . |
תכונות ציבוריות
מִבצָע
Operation operation
תפקידים ציבוריים
ResourceApplyMomentum
ResourceApplyMomentum( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input momentum )
ResourceApplyMomentum
ResourceApplyMomentum( const ::tensorflow::Scope & scope, ::tensorflow::Input var, ::tensorflow::Input accum, ::tensorflow::Input lr, ::tensorflow::Input grad, ::tensorflow::Input momentum, const ResourceApplyMomentum::Attrs & attrs )