tensorflow :: ops :: InvertPermutation

#include <array_ops.h>

Menghitung permutasi terbalik suatu tensor.

Ringkasan

Operasi ini menghitung kebalikan dari permutasi indeks. Dibutuhkan 1-D integer tensor x , yang mewakili indeks dari array berbasis nol, dan menukar setiap nilai dengan posisi indeksnya. Dengan kata lain, untuk tensor keluaran y dan tensor masukan x , operasi ini menghitung hal berikut:

y[x[i]] = i for i in [0, 1, ..., len(x) - 1]

Nilai harus menyertakan 0. Tidak boleh ada nilai duplikat atau nilai negatif.

Sebagai contoh:

# tensor `x` is [3, 4, 0, 2, 1]
invert_permutation(x) ==> [2, 4, 3, 0, 1]

Argumen:

  • scope: Objek Scope
  • x: 1-D.

Pengembalian:

Pembuat dan Penghancur

InvertPermutation (const :: tensorflow::Scope & scope, :: tensorflow::Input x)

Atribut publik

operation
y

Fungsi publik

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

Atribut publik

operasi

Operation operation

y

::tensorflow::Output y

Fungsi publik

InvertPermutation

 InvertPermutation(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input x
)

simpul

::tensorflow::Node * node() const 

operator :: tensorflow :: Input

 operator::tensorflow::Input() const 

operator :: tensorflow :: Keluaran

 operator::tensorflow::Output() const