tensorflow::ops::Gather

#include <array_ops.h>

Kumpulkan potongan dari params sesuai dengan indices .

Ringkasan

indices harus berupa tensor bilangan bulat dengan dimensi apa pun (biasanya 0-D atau 1-D). Menghasilkan tensor keluaran dengan bentuk 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 melakukan permutasi params sesuai dengan permutasi tersebut.

validate_indices : USANG. Jika operasi ini ditugaskan ke CPU, nilai dalam indices selalu divalidasi agar berada dalam rentang yang ditentukan. Jika ditugaskan ke GPU, indeks di luar rentang akan menghasilkan perilaku yang aman tetapi tidak ditentukan, yang mungkin termasuk memunculkan kesalahan.

Argumen:

Mengembalikan:

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)

Atribut publik

operation
output

Fungsi publik

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

Fungsi statis publik

ValidateIndices (bool x)

Struktur

tensorflow::ops::Gather::Attrs

Pengaturan 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::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

Fungsi statis publik

ValidasiIndeks

Attrs ValidateIndices(
  bool x
)