テンソルフロー::作戦::クムプロド
#include <math_ops.h>テンソルxの累積積をaxisに沿って計算します。
まとめ
デフォルトでは、この操作は包括的なcumprodを実行します。これは、入力の最初の要素が出力の最初の要素と同一であることを意味します。
tf.cumprod([a, b, c]) # => [a, a * b, a * b * c] exclusive kwarg をTrueに設定すると、代わりに排他的なcumprodが実行されます。
tf.cumprod([a, b, c], exclusive=True) # => [1, a, a * b]
reverse kwarg を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
演算子::tensorflow::入力
operator::tensorflow::Input() const
演算子::tensorflow::出力
operator::tensorflow::Output() const
パブリック静的関数
エクスクルーシブ
Attrs Exclusive( bool x )
逆行する
Attrs Reverse( bool x )