تدفق التوتر:: العمليات:: الهوية ن

#include <array_ops.h>

تقوم بإرجاع قائمة من الموترات بنفس الأشكال والمحتويات مثل الإدخال.

ملخص

الموترات.

يمكن استخدام هذا المرجع لتجاوز التدرج للوظائف المعقدة. على سبيل المثال، لنفترض أن y = f(x) ونرغب في تطبيق دالة مخصصة g للدعامة الخلفية بحيث يكون 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

الوظائف العامة

الهوية ن

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

المشغل أو العامل[]

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