aliran tensor:: operasi:: Acak Acak
#include <random_ops.h>
Mengacak tensor secara acak sepanjang dimensi pertamanya.
Ringkasan
Tensor diacak sepanjang dimensi 0, sehingga setiap value[j]
dipetakan ke satu dan hanya satu output[i]
. Misalnya, pemetaan yang mungkin terjadi untuk tensor 3x2 adalah:
[[1, 2], [[5, 6],
[3, 4], ==> [1, 2],
[5, 6]] [3, 4]]
Argumen:
- ruang lingkup: Objek Lingkup
- value : Tensor yang akan diacak.
Atribut opsional (lihat Attrs
):
- seed: Jika salah satu
seed
atauseed2
disetel bukan nol, pembuat angka acak akan diunggulkan berdasarkan seed yang diberikan. Jika tidak, ia akan diunggulkan dengan benih acak. - seed2: Seed kedua untuk menghindari tabrakan seed.
Pengembalian:
-
Output
: Tensor dengan bentuk dan tipe yang sama denganvalue
, diacak sepanjang dimensi pertamanya.
Konstruktor dan Destruktor | |
---|---|
RandomShuffle (const :: tensorflow::Scope & scope, :: tensorflow::Input value) | |
RandomShuffle (const :: tensorflow::Scope & scope, :: tensorflow::Input value, const RandomShuffle::Attrs & attrs) |
Fungsi publik | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Struktur | |
---|---|
tensorflow:: ops:: RandomShuffle:: Attrs | Penyetel atribut opsional untuk RandomShuffle . |
Atribut publik
operasi
Operation operation
keluaran
::tensorflow::Output output
Fungsi publik
Acak Acak
RandomShuffle(
const ::tensorflow::Scope & scope,
::tensorflow::Input value
)
Acak Acak
RandomShuffle(
const ::tensorflow::Scope & scope,
::tensorflow::Input value,
const RandomShuffle::Attrs & attrs
)