tensorflow::ops::GatherV2

#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 rilevato un indice fuori dai limiti, viene restituito un errore. Sulla GPU, se viene rilevato un indice fuori dai limiti, viene memorizzato 0 nel valore di output corrispondente.

Vedi anche tf.batch_gather e tf.gather_nd .

Argomentazioni:

  • ambito: un oggetto Scope
  • parametri: Il tensore da cui raccogliere i valori. Deve essere almeno pari al rango axis + 1 .
  • indici: Tensore indice. Deve essere nell'intervallo [0, params.shape[axis]) .
  • asse: l'asse nei params da cui raccogliere indices . Il valore predefinito è la prima dimensione. Supporta indici negativi.

Resi:

  • Output : Valori da params raccolti dagli 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 statiche pubbliche

BatchDims (int64 x)

Strutture

tensorflow::ops::GatherV2::Attrs

Impostazioni opzionali degli attributi per GatherV2 .

attributi pubblici

operazione

Operation operation

produzione

::tensorflow::Output output

Funzioni pubbliche

GatherV2

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

GatherV2

 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::tensoreflusso::output

 operator::tensorflow::Output() const 

Funzioni statiche pubbliche

BatchDims

Attrs BatchDims(
  int64 x
)