tensorflow:: ops:: GatherV2
#include <array_ops.h> Recopilar segmentos del axis de params según los indices .
Resumen
indices deben ser un tensor entero de cualquier dimensión (normalmente 0-D o 1-D). Produce un tensor de salida con forma params.shape[:axis] + indices.shape[batch_dims:] + params.shape[axis + 1:] donde:
# 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]
Tenga en cuenta que, en la CPU, si se encuentra un índice fuera de rango, se devuelve un error. En la GPU, si se encuentra un índice fuera de rango, se almacena un 0 en el valor de salida correspondiente.
Véase también tf.batch_gather y tf.gather_nd .
Argumentos:
- ámbito: Un objeto de ámbito
- params: El tensor del que se obtendrán los valores. Debe tener al menos rango
axis + 1. - índices: Tensor de índices. Debe estar en el rango
[0, params.shape[axis]). - eje: El eje en
paramsdel que se obtendránindices. Por defecto, se utiliza la primera dimensión. Admite índices negativos.
Devoluciones:
-
Output: Valores deparamsrecopilados de los índices dados porindices, con formaparams.shape[:axis] + indices.shape + params.shape[axis + 1:].
Constructores y destructores | |
|---|---|
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) |
Atributos públicos | |
|---|---|
operation | |
output | |
Funciones públicas | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
funciones estáticas públicas | |
|---|---|
BatchDims (int64 x) | |
Estructuras | |
|---|---|
| tensorflow:: ops:: GatherV2:: Attrs | Configuradores de atributos opcionales para GatherV2 . |
Atributos públicos
operación
Operation operation
producción
::tensorflow::Output output
Funciones públicas
ReunirV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis )
ReunirV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis, const GatherV2::Attrs & attrs )
nodo
::tensorflow::Node * node() const
operador::tensorflow::Input
operator::tensorflow::Input() const
operador::tensorflow::Salida
operator::tensorflow::Output() const
funciones estáticas públicas
Dimensiones del lote
Attrs BatchDims( int64 x )