tensorflow :: ops :: SetDiff1D
#include <array_ops.h>
Menghitung perbedaan antara dua daftar angka atau string.
Ringkasan
Mengingat daftar x
dan daftar y
, operasi ini kembali daftar out
yang mewakili semua nilai-nilai yang ada di x
tetapi tidak di y
. Daftar yang dikembalikan out
diurutkan dalam urutan yang sama dengan angka yang muncul di x
(duplikat disimpan). Operasi ini juga mengembalikan daftar idx
yang mewakili posisi setiap elemen out
dalam x
. Dengan kata lain:
out[i] = x[idx[i]] for i in [0, 1, ..., len(out) - 1]
Misalnya, masukan ini diberikan:
x = [1, 2, 3, 4, 5, 6] y = [1, 3, 5]
Operasi ini akan menghasilkan:
out ==> [2, 4, 6] idx ==> [1, 3, 5]
Argumen:
- scope: Objek Scope
- x: 1-D. Nilai yang harus dijaga.
- y: 1-D. Nilai untuk dihapus.
Pengembalian:
-
Output
keluar: 1-D. Nilai ada dix
tapi tidak ada diy
. -
Output
idx: 1-D. Posisi nilaix
dipertahankan diout
.
Pembangun dan Penghancur | |
---|---|
SetDiff1D (const :: tensorflow::Scope & scope, :: tensorflow::Input x, :: tensorflow::Input y) | |
SetDiff1D (const :: tensorflow::Scope & scope, :: tensorflow::Input x, :: tensorflow::Input y, const SetDiff1D::Attrs & attrs) |
Atribut publik | |
---|---|
idx | |
operation | |
out |
Fungsi statis publik | |
---|---|
OutIdx (DataType x) |
Structs | |
---|---|
tensorflow :: ops :: SetDiff1D :: Attrs |
Atribut publik
idx
::tensorflow::Output idx
operasi
Operation operation
di luar
::tensorflow::Output out
Fungsi publik
SetDiff1D
SetDiff1D( const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input y )
SetDiff1D
SetDiff1D( const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input y, const SetDiff1D::Attrs & attrs )
Fungsi statis publik
OutIdx
Attrs OutIdx( DataType x )