Spec-Zone.ru › TensorFlow C++

tensorflow::ops::Gather

#include <array_ops.h>

Gather извлекает фрагменты из params в соответствии с indices.

Краткое описание

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
Operation
output
::tensorflow::Output
Общедоступные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Общедоступные статические функции
ValidateIndices(bool x)
Attrs
Структуры
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

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API