tensorflow:: ops:: Cumprod

#include <math_ops.h>

axisに沿ったテンソルxの累積積を計算します。

まとめ

デフォルトでは、この操作は包括的な累積演算を実行します。つまり、入力の最初の要素は出力の最初の要素と同一になります。

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

exclusive引数をTrueに設定すると、代わりに排他的 cumprod が実行されます。

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

reverseキーワード引数をTrueに設定することで、cumprod は逆方向に実行されます。

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]

議論:

  • スコープ:スコープオブジェクト
  • x: Tensor 。以下のいずれかの型である必要があります: float32 、 float64 、 int64 、 int32 、 uint8 、 uint16 、 int16 、 int8 、 complex64 、 complex128 、 qint8 、 quint8 、 qint32 、 half 。
  • axis: int32型のTensor (デフォルト: 0)。範囲は[-rank(x), rank(x))である必要があります。

オプション属性( Attrs参照):

  • exclusive: Trueの場合、排他的 cumprod を実行します。
  • reverse: 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
out

公的機能

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

パブリック静的関数

Exclusive (bool x)
Reverse (bool x)

構造

tensorflow:: ops:: Cumprod:: Attrs

Cumprodのオプション属性設定子。

公開属性

手術

Operation operation

外

::tensorflow::Output out

公的機能

カムプロッド

 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
)

ノード

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

パブリック静的関数

エクスクルーシブ

Attrs Exclusive(
  bool x
)

逆行する

Attrs Reverse(
  bool x
)