tensorflow:: ops:: זהותN

#include <array_ops.h>

מחזירה רשימה של טנזורים בעלי צורות ותוכן זהים לקלט.

תַקצִיר

טנזורים.

ניתן להשתמש באופציה זו כדי לעקוף את הגרדיאנט עבור פונקציות מורכבות. לדוגמה, נניח ש-y = f(x) ואנו רוצים להחיל פונקציה מותאמת אישית g עבור backprop כך ש-dx = g(dy). בפייתון,

with tf.get_default_graph().gradient_override_map(
    {'IdentityN': 'OverrideGradientWithG'}):
  y, _ = identity_n([f(x), x])

.RegisterGradient('OverrideGradientWithG')
def ApplyG(op, dy, _):
  return [None, g(dy)]  # Do not backprop to f(x).

טיעונים:

החזרות:

  • OutputList : טנזור הפלט.

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

IdentityN (const :: tensorflow::Scope & scope, :: tensorflow::InputList input)

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

operation
output

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

operator[] (size_t index) const

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

מִבצָע

Operation operation

תְפוּקָה

::tensorflow::OutputList output

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

זהותN

 IdentityN(
  const ::tensorflow::Scope & scope,
  ::tensorflow::InputList input
)

מַפעִיל[]

::tensorflow::Output operator[](
  size_t index
) const