Google I/O にご注目いただきありがとうございます。すべてのセッションをオンデマンドで表示オンデマンドで見る

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 。次のいずれかのタイプである必要があります: float32float64int64int32uint8uint16int16int8complex64complex128qint8quint8qint32half
  • 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
)