aliran tensor:: operasi:: Mengumpulkan
#include <array_ops.h>
Kumpulkan irisan dari params
menurut indices
.
Ringkasan
indices
harus berupa tensor bilangan bulat dengan dimensi apa pun (biasanya 0-D atau 1-D). Menghasilkan tensor keluaran dengan indices.shape + params.shape[1:]
di mana:
# Scalar indices
output[:, ..., :] = params[indices, :, ... :]
# Vector indices
output[i, :, ..., :] = params[indices[i], :, ... :]
# Higher rank indices
output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :]
Jika indices
adalah permutasi dan len(indices) == params.shape[0]
maka operasi ini akan mengubah params
yang sesuai.
validate_indices
: TIDAK DIGUNAKAN LAGI. Jika operasi ini ditugaskan ke CPU, nilai dalam indices
selalu divalidasi agar berada dalam jangkauan. Jika ditetapkan ke GPU, indeks di luar batas menghasilkan perilaku yang aman namun tidak ditentukan, yang mungkin termasuk memunculkan kesalahan.

Argumen:
- ruang lingkup: Objek Lingkup
Pengembalian:
-
Output
: Tensor keluaran.
Konstruktor dan Destruktor | |
---|---|
Gather (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices) | |
Gather (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, const Gather::Attrs & attrs) |
Fungsi publik | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Fungsi statis publik | |
---|---|
ValidateIndices (bool x) |
Struktur | |
---|---|
tensorflow:: ops:: Kumpulkan:: Attrs | Penyetel atribut opsional untuk Gather . |
Atribut publik
operasi
Operation operation
keluaran
::tensorflow::Output output
Fungsi publik
Mengumpulkan
Gather(
const ::tensorflow::Scope & scope,
::tensorflow::Input params,
::tensorflow::Input indices
)
Mengumpulkan
Gather(
const ::tensorflow::Scope & scope,
::tensorflow::Input params,
::tensorflow::Input indices,
const Gather::Attrs & attrs
)
simpul
::tensorflow::Node * node() const
operator::tensorflow::Masukan
operator::tensorflow::Input() const
operator::tensorflow::Keluaran
operator::tensorflow::Output() const
Fungsi statis publik
Validasi Indeks
Attrs ValidateIndices(
bool x
)