Spec-Zone.ru › TensorFlow C++ 2.4

tensorflow::ops::Stack

#include <array_ops.h>

Упаковывает список N тензоров ранга R в один тензор ранга (R+1).

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

Упаковывает N тензоры в values в тензор с рангом на единицу выше, чем у каждого тензора в values, упаковывая их вдоль axis размерности. Учитывая список тензоров формы (A, B, C);

если axis == 0, то тензор output будет иметь форму (N, A, B, C). Если axis == 1, то тензор output будет иметь форму (A, N, B, C). И так далее.

Например:

# 'x' is [1, 4]
# 'y' is [2, 5]
# 'z' is [3, 6]
pack([x, y, z]) => [[1, 4], [2, 5], [3, 6]]  # Pack along first dim.
pack([x, y, z], axis=1) => [[1, 2, 3], [4, 5, 6]]

Это противоположно unpack.

Аргументы:

  • scope: Объект Scope
  • values: Должны иметь одинаковую форму и тип.

Необязательные атрибуты (см. Attrs):

  • axis: Размерность для упаковки. Отрицательные значения оборачиваются, поэтому допустимый диапазон [-(R+1), R+1).

Возвращает:

  • Output: Упакованный тензор.
Конструкторы и деструкторы
Stack(const ::tensorflow::Scope & scope, ::tensorflow::InputList values)
Stack(const ::tensorflow::Scope & scope, ::tensorflow::InputList values, const Stack::Attrs & attrs)
Общедоступные атрибуты
operation
Operation
output
::tensorflow::Output
Общедоступные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Общедоступные статические функции
Axis(int64 x)
Attrs
Структуры
tensorflow::ops::Stack::Attrs

Необязательные установщики атрибутов для Stack.

Общедоступные атрибуты

operation

Operation operation

output

::tensorflow::Output output

Общедоступные функции

Stack

 Stack(
  const ::tensorflow::Scope & scope,
  ::tensorflow::InputList values
)

Stack

 Stack(
  const ::tensorflow::Scope & scope,
  ::tensorflow::InputList values,
  const Stack::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

Общедоступные статические функции

Axis

Attrs Axis(
  int64 x
)

© 2020 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/versions/r2.4/api_docs/cc/class/tensorflow/ops/stack

Spec-Zone.ru

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