tensoreflusso:: ops:: Raccogli V2

#include <array_ops.h>

Raccogli le sezioni axis params secondo indices .

Riepilogo

indices devono essere un tensore intero di qualsiasi dimensione (solitamente 0-D o ​​1-D). Produce un tensore di output con forma params.shape[:axis] + indices.shape + params.shape[axis + 1:] dove:

    # Scalar indices (output is rank(params) - 1).
    output[a_0, ..., a_n, b_0, ..., b_n] =
      params[a_0, ..., a_n, indices, b_0, ..., b_n]

    # Vector indices (output is rank(params)).
    output[a_0, ..., a_n, i, b_0, ..., b_n] =
      params[a_0, ..., a_n, indices[i], b_0, ..., b_n]

    # Higher rank indices (output is rank(params) + rank(indices) - 1).
    output[a_0, ..., a_n, i, ..., j, b_0, ... b_n] =
      params[a_0, ..., a_n, indices[i, ..., j], b_0, ..., b_n]

Si noti che sulla CPU, se viene trovato un indice fuori limite, viene restituito un errore. Sulla GPU, se viene trovato un indice fuori limite, viene archiviato uno 0 nel valore di output corrispondente.

Vedi anche tf.batch_gather e tf.gather_nd .

Argomenti:

  • scope: un oggetto Scope
  • params: il tensore da cui raccogliere valori. Deve essere almeno axis + 1 .
  • indici: tensore dell'indice. Deve essere compreso nell'intervallo [0, params.shape[axis]) .
  • asse: l'asse in params da cui raccogliere indices . Il valore predefinito è la prima dimensione. Supporta indici negativi.

Ritorna:

  • Output : valori da params raccolti da indici forniti da indices , con forma params.shape[:axis] + indices.shape + params.shape[axis + 1:] .

Costruttori e distruttori

GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis)
GatherV2 (const :: tensorflow::Scope & scope, :: tensorflow::Input params, :: tensorflow::Input indices, :: tensorflow::Input axis, const GatherV2::Attrs & attrs)

Attributi pubblici

operation
output

Funzioni pubbliche

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

Funzioni pubbliche statiche

BatchDims (int64 x)

Strutture

tensorflow:: ops:: GatherV2:: Attrs

Setter di attributi facoltativi per GatherV2 .

Attributi pubblici

operazione

Operation operation

produzione

::tensorflow::Output output

Funzioni pubbliche

Raccogli V2

 GatherV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices,
  ::tensorflow::Input axis
)

Raccogli V2

 GatherV2(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input params,
  ::tensorflow::Input indices,
  ::tensorflow::Input axis,
  const GatherV2::Attrs & attrs
)

nodo

::tensorflow::Node * node() const 

operatore::tensorflow::Input

 operator::tensorflow::Input() const 

operatore::tensorflow::Output

 operator::tensorflow::Output() const 

Funzioni pubbliche statiche

BatchDim

Attrs BatchDims(
  int64 x
)