тензорный поток:: опс:: СборV2
#include <array_ops.h> Соберите срезы из axis params в соответствии с indices .
Краткое содержание
indices должны быть целочисленным тензором любой размерности (обычно 0-D или 1-D). Создает выходной тензор с формой params.shape[:axis] + indices.shape + params.shape[axis + 1:] где:
# 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]
Обратите внимание, что на процессоре, если обнаруживается выходной индекс, возвращается ошибка. На графическом процессоре, если обнаруживается выходной индекс, в соответствующем выходном значении сохраняется 0.
См. также tf.batch_gather и tf.gather_nd .
Аргументы:
- область: объект области.
- params: Тензор, из которого собираются значения. Должно быть как минимум
axis + 1. - индексы: Тензор индекса. Должно находиться в диапазоне
[0, params.shape[axis]). - ось: ось в
paramsиз которой собираютсяindices. По умолчанию используется первое измерение. Поддерживает отрицательные индексы.
Возврат:
-
Output: значенияparamsсобранные из индексов, заданныхindices, с формойparams.shape[:axis] + indices.shape + params.shape[axis + 1:].
Конструкторы и деструкторы | |
|---|---|
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) |
Публичные атрибуты | |
|---|---|
operation | |
output | |
Общественные функции | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Публичные статические функции | |
|---|---|
BatchDims (int64 x) | |
Структуры | |
|---|---|
| tensorflow::ops::GatherV2::Attrs | Дополнительные установщики атрибутов для GatherV2 . |
Публичные атрибуты
операция
Operation operation
выход
::tensorflow::Output output
Общественные функции
СборV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis )
СборV2
GatherV2( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, ::tensorflow::Input axis, const GatherV2::Attrs & attrs )
узел
::tensorflow::Node * node() const
оператор::tensorflow::Input
operator::tensorflow::Input() const
оператор::tensorflow::Выход
operator::tensorflow::Output() const
Публичные статические функции
Пакетные измерения
Attrs BatchDims( int64 x )