tensorflow:: ops:: ResourceApplyKerasMomentum

#include <training_ops.h>

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

תַקצִיר

הגדר use_nesterov = True אם ברצונך להשתמש במומנט נסטרוב.

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

טיעונים:

  • היקף: אובייקט היקף
  • var: צריך להיות מתוך Variable().
  • accum: צריך להיות מ-Variable().
  • lr: גורם קנה מידה. חייב להיות סקלרי.
  • גראד: הגרדיאנט.
  • תנע: תנע. חייב להיות סקלרי.

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

  • use_locking: אם True , עדכון הטנזורים var ו-accum יהיה מוגן על ידי נעילה; אחרת ההתנהגות אינה מוגדרת, אך עשויה להפגין פחות תחרות.
  • use_nesterov: אם True , הטנזור המועבר לחישוב ה-grad יהיה var + momentum * 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::Operation

 operator::tensorflow::Operation() const 

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

שימוש בנעילה

Attrs UseLocking(
  bool x
)

יוזנסטרוב

Attrs UseNesterov(
  bool x
)