tensorflow:: ops:: BatchMatMul

#include <math_ops.h>

2つのテンソルのスライスをバッチ処理で乗算します。

まとめ

Tensor xとyのすべてのスライスを乗算し (各スライスはバッチの要素とみなすことができます)、個々の結果を同じバッチサイズの単一の出力テンソルにまとめます。各スライスは、乗算の前にオプションで随伴化 (行列の随伴化とは、行列を転置して共役化することです) できます。これは、 adj_xまたはadj_yフラグをTrueに設定することで行います (デフォルトではFalseです)。

入力テンソルxとy 、形状が[..., r_x, c_x]および[..., r_y, c_y]の 2 次元以上のテンソルです。

出力テンソルは2次元以上で、形状は[..., r_o, c_o]である。ここで、

r_o = c_x if adj_x else r_x
c_o = r_y if adj_y else c_y

計算方法は以下のとおりです。

output[..., :, :] = matrix(x[..., :, :]) * matrix(y[..., :, :])

議論:

  • スコープ:スコープオブジェクト
  • x: 形状が[..., r_x, c_x]の 2 次元以上。
  • y: 形状が[..., r_y, c_y]の 2 次元以上。

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

  • adj_x: Trueの場合、 xのスライスを隣接させます。デフォルトはFalseです。
  • adj_y: Trueの場合、 yのスライスを随伴します。デフォルトはFalseです。

返品:

  • Output :形状[..., r_o, c_o]の3次元以上

コンストラクターとデストラクタ

BatchMatMul (const :: tensorflow::Scope & scope, :: tensorflow::Input x, :: tensorflow::Input y)
BatchMatMul (const :: tensorflow::Scope & scope, :: tensorflow::Input x, :: tensorflow::Input y, const BatchMatMul::Attrs & attrs)

公開属性

operation
output

公的機能

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

パブリック静的関数

AdjX (bool x)
AdjY (bool x)

構造

tensorflow:: ops:: BatchMatMul:: Attrs

BatchMatMulのオプション属性セッター。

公開属性

手術

Operation operation

出力

::tensorflow::Output output

公的機能

バッチマットマルチ

 BatchMatMul(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input x,
  ::tensorflow::Input y
)

バッチマットマルチ

 BatchMatMul(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input x,
  ::tensorflow::Input y,
  const BatchMatMul::Attrs & attrs
)

ノード

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

パブリック静的関数

調整

Attrs AdjX(
  bool x
)

形容詞

Attrs AdjY(
  bool x
)