tensorflow:: אופס:: ResourceApplyKerasMomentum

#include <training_ops.h>

עדכן את '*var' לפי סכימת המומנטום.

סיכום

הגדר use_nesterov = נכון אם אתה

רוצה להשתמש במומנטום נסטרוב.

accum = accum * מומנטום - lr * grad var += accum

טיעונים:

  • scope: אובייקט Scope
  • var: צריך להיות מ-Variable().
  • acum: צריך להיות ממשתנה().
  • lr: גורם קנה מידה. חייב להיות סקלר.
  • grad: השיפוע.
  • מומנטום: מומנטום. חייב להיות סקלר.

מאפיינים אופציונליים (ראה Attrs ):

  • use_locking: אם True , עדכון של טנסור ה-var ו-acum יהיה מוגן על ידי מנעול; אחרת ההתנהגות אינה מוגדרת, אך עלולה להפגין פחות מחלוקת.
  • use_nesterov: אם True , הטנזור שיעבור לחישוב גראד יהיה var + מומנטום * accum, אז בסופו של דבר, ה- var שתקבל הוא למעשה var + momentum * accum.

החזרות:

בנאים והורסים

ResourceApplyKerasMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum)
ResourceApplyKerasMomentum (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input lr, :: tensorflow::Input grad, :: tensorflow::Input momentum, const ResourceApplyKerasMomentum::Attrs & attrs)

תכונות ציבוריות

operation

תפקידים ציבוריים

operator::tensorflow::Operation () const

פונקציות סטטיות ציבוריות

UseLocking (bool x)
UseNesterov (bool x)

מבנים

tensorflow:: ops:: ResourceApplyKerasMomentum:: Attrs

קובעי תכונות אופציונליים עבור ResourceApplyKerasMomentum .

תכונות ציבוריות

מבצע

Operation operation

תפקידים ציבוריים

ResourceApplyKerasMomentum

 ResourceApplyKerasMomentum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input momentum
)

ResourceApplyKerasMomentum

 ResourceApplyKerasMomentum(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input lr,
  ::tensorflow::Input grad,
  ::tensorflow::Input momentum,
  const ResourceApplyKerasMomentum::Attrs & attrs
)

אופרטור::tensorflow::פעולה

 operator::tensorflow::Operation() const 

פונקציות סטטיות ציבוריות

השתמש בנעילה

Attrs UseLocking(
  bool x
)

השתמש ב-Nesterov

Attrs UseNesterov(
  bool x
)