tensorflow:: ops:: IdentityN

#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