tensorflow :: ops ::カンプロド
#include <math_ops.h>
axis
沿ったテンソル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
):
- 排他的:
True
場合、排他的cumprodを実行します。 - 逆:
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 )