tensorflow::ops::BatchMatMul
#include <math_ops.h>Mengalikan irisan dari dua tensor dalam batch.
Ringkasan
Mengalikan semua irisan Tensor x dan y (setiap irisan dapat dilihat sebagai elemen dari sebuah batch), dan menyusun hasil individual ke dalam satu tensor keluaran dengan ukuran batch yang sama. Setiap irisan individual secara opsional dapat di-adjoint (meng-adjoint matriks berarti mentranspos dan mengkonjugasinya) sebelum perkalian dengan mengatur flag adj_x atau adj_y ke True , yang secara default False .
Tensor input x dan y adalah tensor 2-D atau lebih tinggi dengan bentuk [..., r_x, c_x] dan [..., r_y, c_y] .
Tensor keluarannya adalah 2-D atau lebih tinggi dengan bentuk [..., r_o, c_o] , di mana:
r_o = c_x if adj_x else r_x c_o = r_y if adj_y else c_y
Ini dihitung sebagai:
output[..., :, :] = matrix(x[..., :, :]) * matrix(y[..., :, :])
Argumen:
- Cakupan: Objek Cakupan
- x: 2-D atau lebih tinggi dengan bentuk
[..., r_x, c_x]. - y: 2-D atau lebih tinggi dengan bentuk
[..., r_y, c_y].
Atribut opsional (lihat Attrs ):
- adj_x: Jika
True, maka tambahkan irisanxke dalam himpunan adjoin. Nilai defaultnya adalahFalse. - adj_y: Jika
True, maka akan menambahkan irisany. Nilai defaultnya adalahFalse.
Mengembalikan:
-
Output: 3-D atau lebih tinggi dengan bentuk[..., r_o, c_o]
Konstruktor dan Destruktor | |
|---|---|
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) |
Atribut publik | |
|---|---|
operation | |
output | |
Fungsi publik | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Fungsi statis publik | |
|---|---|
AdjX (bool x) | |
AdjY (bool x) | |
Struktur | |
|---|---|
| tensorflow::ops::BatchMatMul::Attrs | Pengaturan atribut opsional untuk BatchMatMul . |
Atribut publik
operasi
Operation operation
keluaran
::tensorflow::Output output
Fungsi publik
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 )
simpul
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Fungsi statis publik
AdjX
Attrs AdjX( bool x )
AdjY
Attrs AdjY( bool x )