tensorflow::ops::Gather
#include <array_ops.h>
Gather извлекает срезы из params в соответствии с indices.
Краткое описание
indices должен быть целочисленным тензором любой размерности (обычно 0-D или 1-D). Создаёт выходной тензор с формой 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 )
© 2022 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 4.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/gather