Spec-Zone.ru › TensorFlow C++ 2.9

tensorflow::ops::Cumprod

#include <math_ops.h>

Вычислить кумулятивное произведение тензора x вдоль axis.

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

По умолчанию этот оператор выполняет включительное кумулятивное произведение, что означает, что первый элемент входных данных идентичен первому элементу выходных данных:

tf.cumprod([a, b, c])  # => [a, a * b, a * b * c]

Установив exclusive kwarg в True, вместо этого выполняется исключительное кумулятивное произведение:

tf.cumprod([a, b, c], exclusive=True)  # => [1, a, a * b]

Установив reverse kwarg в True, кумулятивное произведение выполняется в обратном направлении:

tf.cumprod([a, b, c], reverse=True)  # => [a * b * c, b * c, c]

Это более эффективно, чем использование отдельных tf.reverse операторов.

Ключевые слова reverse и exclusive также могут быть объединены:

tf.cumprod([a, b, c], exclusive=True, reverse=True)  # => [b * c, c, 1]

Аргументы:

  • scope: Объект Scope
  • x: A Tensor. Должен быть одним из следующих типов: float32, float64, int64, int32, uint8, uint16, int16, int8, complex64, complex128, qint8, quint8, qint32, half.
  • axis: A Tensor типа int32 (по умолчанию: 0). Должен находиться в диапазоне [-rank(x), rank(x)).

Дополнительные атрибуты (см. Attrs):

  • exclusive: Если True, выполнить исключительное кумулятивное произведение.
  • reverse: A bool (по умолчанию: False).

Возвращаемое значение:

  • Output: Тензор вывода.
Конструкторы и деструкторы
Cumprod(const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input axis)
Cumprod(const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input axis, const Cumprod::Attrs & attrs)
Публичные атрибуты
operation
Operation
out
::tensorflow::Output
Публичные функции
node() const
::tensorflow::Node *
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Публичные статические функции
Exclusive(bool x)
Attrs
Reverse(bool x)
Attrs
Структуры
tensorflow::ops::Cumprod::Attrs

Дополнительные атрибуты для настройки Cumprod.

Публичные атрибуты

operation

Operation operation

out

::tensorflow::Output out

Публичные функции

Cumprod

 Cumprod(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input x,
  ::tensorflow::Input axis
)

Cumprod

 Cumprod(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input x,
  ::tensorflow::Input axis,
  const Cumprod::Attrs & attrs
)

node

::tensorflow::Node * node() const 

operator::tensorflow::Input

operator::tensorflow::Input() const 

operator::tensorflow::Output

operator::tensorflow::Output() const 

Публичные статические функции

Exclusive

Attrs Exclusive(
  bool x
)

Reverse

Attrs Reverse(
  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/versions/r2.9/api_docs/cc/class/tensorflow/ops/cumprod

Spec-Zone.ru

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