tensorflow:: אופס:: החל אדם

#include <training_ops.h>

עדכן את '*var' לפי אלגוריתם Adam.

סיכום

$$lr_t := {learning_rate} * {1 - beta_2^t} / (1 - beta_1^t)$$
$$m_t := beta_1 * m_{t-1} + (1 - beta_1) * g$$
$$v_t := beta_2 * v_{t-1} + (1 - beta_2) * g * g$$
$$variable := variable - lr_t * m_t / ({v_t} + )$$

טיעונים:

  • scope: אובייקט Scope
  • var: צריך להיות מ-Variable().
  • m: צריך להיות ממשתנה().
  • v: צריך להיות מ-Variable().
  • beta1_power: חייב להיות סקלרי.
  • beta2_power: חייב להיות סקלרי.
  • lr: גורם קנה מידה. חייב להיות סקלר.
  • beta1: גורם מומנטום. חייב להיות סקלר.
  • beta2: גורם מומנטום. חייב להיות סקלר.
  • אפסילון: מונח רכס. חייב להיות סקלר.
  • grad: השיפוע.

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

  • use_locking: אם True , עדכון הטנזורים var, m ו-v יהיה מוגן על ידי מנעול; אחרת ההתנהגות אינה מוגדרת, אך עלולה להפגין פחות מחלוקת.
  • use_nesterov: אם True , משתמש בעדכון nesterov.

החזרות:

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

ApplyAdam (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input m, :: tensorflow::Input v, :: tensorflow::Input beta1_power, :: tensorflow::Input beta2_power, :: tensorflow::Input lr, :: tensorflow::Input beta1, :: tensorflow::Input beta2, :: tensorflow::Input epsilon, :: tensorflow::Input grad)
ApplyAdam (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input m, :: tensorflow::Input v, :: tensorflow::Input beta1_power, :: tensorflow::Input beta2_power, :: tensorflow::Input lr, :: tensorflow::Input beta1, :: tensorflow::Input beta2, :: tensorflow::Input epsilon, :: tensorflow::Input grad, const ApplyAdam::Attrs & attrs)

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

operation
out

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

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

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

UseLocking (bool x)
UseNesterov (bool x)

מבנים

tensorflow:: ops:: ApplyAdam:: Attrs

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

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

מבצע

Operation operation

הַחוּצָה

::tensorflow::Output out

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

החל אדם

 ApplyAdam(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input m,
  ::tensorflow::Input v,
  ::tensorflow::Input beta1_power,
  ::tensorflow::Input beta2_power,
  ::tensorflow::Input lr,
  ::tensorflow::Input beta1,
  ::tensorflow::Input beta2,
  ::tensorflow::Input epsilon,
  ::tensorflow::Input grad
)

החל אדם

 ApplyAdam(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input m,
  ::tensorflow::Input v,
  ::tensorflow::Input beta1_power,
  ::tensorflow::Input beta2_power,
  ::tensorflow::Input lr,
  ::tensorflow::Input beta1,
  ::tensorflow::Input beta2,
  ::tensorflow::Input epsilon,
  ::tensorflow::Input grad,
  const ApplyAdam::Attrs & attrs
)

צוֹמֶת

::tensorflow::Node * node() const 

מפעיל::tensorflow::קלט

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

השתמש בנעילה

Attrs UseLocking(
  bool x
)

השתמש ב-Nesterov

Attrs UseNesterov(
  bool x
)