tensorflow:: אופס:: DiagPart

#include <array_ops.h>

מחזירה את החלק האלכסוני של הטנזור.

סיכום

פעולה זו מחזירה טנזור עם החלק diagonal של input . החלק diagonal מחושב באופן הבא:

נניח input יש מידות [D1,..., Dk, D1,..., Dk] , אז הפלט הוא טנסור בדרגה k עם מידות [D1,..., Dk] כאשר:

diagonal[i1,..., ik] = input[i1, ..., ik, i1,..., ik] .

לדוגמה:

# 'input' is [[1, 0, 0, 0]
              [0, 2, 0, 0]
              [0, 0, 3, 0]
              [0, 0, 0, 4]]

tf.diag_part(input) ==> [1, 2, 3, 4]

טיעונים:

  • scope: אובייקט Scope
  • קלט: דירוג k tensor שבו k הוא זוגי ולא אפס.

החזרות:

  • Output : האלכסון שחולץ.

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

DiagPart (const :: tensorflow::Scope & scope, :: tensorflow::Input input)

תכונות ציבוריות

diagonal
operation

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

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

תכונות ציבוריות

אֲלַכסוֹנִי

::tensorflow::Output diagonal

מבצע

Operation operation

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

DiagPart

 DiagPart(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input input
)

צוֹמֶת

::tensorflow::Node * node() const 

מפעיל::tensorflow::קלט

 operator::tensorflow::Input() const 

אופרטור::tensorflow::פלט

 operator::tensorflow::Output() const