tensorflow:: אופס:: InvertPermutation
#include <array_ops.h>
מחשב את התמורה ההפוכה של טנזור.
תַקצִיר
פעולה זו מחשבת את היפוך של תמורה לאינדקס. זה לוקח טנסור 1-D שלם x
, המייצג את המדדים של מערך מבוסס אפס, ומחליף כל ערך במיקום האינדקס שלו. במילים אחרות, עבור טנסור פלט y
וטנסור קלט x
, פעולה זו מחשבת את הדברים הבאים:
y[x[i]] = i for i in [0, 1, ..., len(x) - 1]
הערכים חייבים לכלול 0. לא יכולים להיות ערכים כפולים או ערכים שליליים.
לְדוּגמָה:
# tensor `x` is [3, 4, 0, 2, 1] invert_permutation(x) ==> [2, 4, 3, 0, 1]
טיעונים:
- scope: אובייקט Scope
- x: 1-D.
החזרות:
-
Output
: 1-D.
בנאים והורסים | |
---|---|
InvertPermutation (const :: tensorflow::Scope & scope, :: tensorflow::Input x) |
תפקידים ציבוריים | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
תכונות ציבוריות
מִבצָע
Operation operation
y
::tensorflow::Output y
תפקידים ציבוריים
InvertPermutation
InvertPermutation( const ::tensorflow::Scope & scope, ::tensorflow::Input x )
צוֹמֶת
::tensorflow::Node * node() const
מפעיל::tensorflow::קלט
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const