tensorflow:: אופס:: זהות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).
טיעונים:
- scope: אובייקט Scope
החזרות:
-
OutputList
: טנזור הפלט.
בנאים והורסים | |
---|---|
IdentityN (const :: tensorflow::Scope & scope, :: tensorflow::InputList input) |
תפקידים ציבוריים | |
---|---|
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