tensorflow:: ops:: ResourceSparseApplyFtrlV2

#include <training_ops.h>

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

תַקצִיר

כלומר, עבור שורות שיש לנו grad עבורן, אנו מעדכנים את var, accum ו- linear באופן הבא: grad_with_shrinkage = grad + 2 * l2_shrinkage * var accum_new = accum + grad_with_shrinkage * grad_with_shrinkage linear += grad_with_shrinkage + (accum_new^(-lr_power) - accum^(-lr_power)) / lr * var quadratic = 1.0 / (accum_new^(lr_power) * lr) + 2 * l2 var = (sign(linear) * l1 - linear) / quadratic if |linear| > l1 else 0.0 accum = accum_new

טיעונים:

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

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

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

החזרות:

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

ResourceSparseApplyFtrlV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input linear, :: tensorflow::Input grad, :: tensorflow::Input indices, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input l2_shrinkage, :: tensorflow::Input lr_power)
ResourceSparseApplyFtrlV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input var, :: tensorflow::Input accum, :: tensorflow::Input linear, :: tensorflow::Input grad, :: tensorflow::Input indices, :: tensorflow::Input lr, :: tensorflow::Input l1, :: tensorflow::Input l2, :: tensorflow::Input l2_shrinkage, :: tensorflow::Input lr_power, const ResourceSparseApplyFtrlV2::Attrs & attrs)

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

operation

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

operator::tensorflow::Operation () const

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

UseLocking (bool x)

מבנים

tensorflow:: ops:: ResourceSparseApplyFtrlV2:: Attrs

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

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

מִבצָע

Operation operation

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

ResourceSparseApplyFtrlV2

 ResourceSparseApplyFtrlV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input linear,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input l2_shrinkage,
  ::tensorflow::Input lr_power
)

ResourceSparseApplyFtrlV2

 ResourceSparseApplyFtrlV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input var,
  ::tensorflow::Input accum,
  ::tensorflow::Input linear,
  ::tensorflow::Input grad,
  ::tensorflow::Input indices,
  ::tensorflow::Input lr,
  ::tensorflow::Input l1,
  ::tensorflow::Input l2,
  ::tensorflow::Input l2_shrinkage,
  ::tensorflow::Input lr_power,
  const ResourceSparseApplyFtrlV2::Attrs & attrs
)

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

 operator::tensorflow::Operation() const 

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

שימוש בנעילה

Attrs UseLocking(
  bool x
)