tensorflow::ops::Gather
#include <array_ops.h>
Gather срезы из params в соответствии с indices.
Summary
indices должен быть целочисленным тензором любой размерности (обычно 0-мерным или 1-мерным). Создаёт выходной тензор с формой indices.shape + params.shape[1:], где:
# Scalar indices output[:, ..., :] = params[indices, :, ... :]
# Vector indices output[i, :, ..., :] = params[indices[i], :, ... :]
# Higher rank indices output[i, ..., j, :, ... :] = params[indices[i, ..., j], :, ..., :]
Если indices является перестановкой и len(indices) == params.shape[0], то эта операция переставит params соответственно.
validate_indices: УСТАРЕВШЕЕ. Если эта операция назначена процессору CPU, значения в indices всегда проверяются на соответствие диапазону. Если назначена GPU, индексы вне диапазона приводят к безопасному, но неопределённому поведению, которое может включать поднятие ошибки.
Аргументы:
- scope: Объект Scope
Возвращает:
-
Output: Выходной тензор.
| Конструкторы и деструкторы | |
|---|---|
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) |
| Публичные атрибуты | |
|---|---|
operation | |
output | |
| Публичные функции | |
|---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const | |
| Публичные статические функции | |
|---|---|
ValidateIndices(bool x) | |
| Структуры | |
|---|---|
| tensorflow::ops::Gather::Attrs | Дополнительные параметры для Gather. |
Публичные атрибуты
operation
Operation operation
output
::tensorflow::Output output
Публичные функции
Gather
Gather( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices )
Gather
Gather( const ::tensorflow::Scope & scope, ::tensorflow::Input params, ::tensorflow::Input indices, const Gather::Attrs & attrs )
node
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Публичные статические функции
ValidateIndices
Attrs ValidateIndices( bool x )
© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/cc/class/tensorflow/ops/gather