tensorflow:: ops:: ApplyMomentum

#include <training_ops.h>

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

תַקצִיר

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

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

טיעונים:

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

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

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

החזרות:

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

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

מאפיינים ציבוריים

operation
out

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

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

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

UseLocking (bool x)
UseNesterov (bool x)

מבנים

tensorflow:: ops:: ApplyMomentum:: Attrs

קובעי מאפיינים אופציונליים עבור ApplyMomentum .

מאפיינים ציבוריים

מִבצָע

Operation operation

הַחוּצָה

::tensorflow::Output out

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

החלת מומנטום

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

החלת מומנטום

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

צוֹמֶת

::tensorflow::Node * node() const 

אופרטור::tensorflow::קלט

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

שימוש בנעילה

Attrs UseLocking(
  bool x
)

יוזנסטרוב

Attrs UseNesterov(
  bool x
)