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]
2D以上。 - y:形状が
[..., r_y, c_y]
2次元以上。
オプションの属性(参照Attrs
):
- adj_x:
True
場合、x
のスライスを随伴します。デフォルトはFalse
です。 - adj_y:
True
場合、y
のスライスを随伴します。デフォルトはFalse
です。
戻り値:
-
Output
:形状[..., r_o, c_o]
コンストラクタとデストラクタ | |
---|---|
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
BatchMatMul( const ::tensorflow::Scope & scope, ::tensorflow::Input x, ::tensorflow::Input y )
BatchMatMul
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
パブリック静的関数
AdjX
Attrs AdjX( bool x )
AdjY
Attrs AdjY( bool x )