tensorflow:: ops:: ResourceSparseApplyMomentum

#include <training_ops.h>

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

תַקצִיר

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

זה עבור שורות שיש לנו grad עבורן, אנחנו מעדכנים את var ו- accum באופן הבא:

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

טיעונים:

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

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

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

החזרות:

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

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

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

operation

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

operator::tensorflow::Operation () const

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

UseLocking (bool x)
UseNesterov (bool x)

מבנים

tensorflow:: ops:: ResourceSparseApplyMomentum:: Attrs

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

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

מִבצָע

Operation operation

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

משאבים דלילים ביישומים מומנטום

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

משאבים דלילים ביישומים מומנטום

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

אופרטור::tensorflow::Operation

 operator::tensorflow::Operation() const 

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

שימוש בנעילה

Attrs UseLocking(
  bool x
)

יוזנסטרוב

Attrs UseNesterov(
  bool x
)