เทนเซอร์โฟลว์:: ออปส์:: แมทมัล
#include <math_ops.h>คูณเมท ริกซ์ "a" ด้วยเมทริกซ์ "b"
สรุป
ข้อมูลที่ป้อนต้องเป็นเมทริกซ์สองมิติ และมิติภายในของ "a" (หลังจากสลับแถวและคอลัมน์แล้ว หาก transpose_a เป็นจริง) ต้องตรงกับมิติภายนอกของ "b" (หลังจากสลับแถวและคอลัมน์แล้ว หาก transposed_b เป็นจริง)
หมายเหตุ : การใช้งานเคอร์เนลเริ่มต้นสำหรับ MatMul บน GPU ใช้ cublas
ข้อโต้แย้ง:
- ขอบเขต: วัตถุ ขอบเขต
คุณลักษณะเสริม (ดูที่ Attrs ):
- transpose_a: ถ้าเป็นจริง จะทำการสลับตำแหน่งของ "a" ก่อนทำการคูณ
- transpose_b: ถ้าเป็นจริง ค่า "b" จะถูกสลับตำแหน่งก่อนทำการคูณ
การส่งคืนสินค้า:
-
Output: เทนเซอร์ผลคูณ
ตัวสร้างและตัวทำลาย | |
|---|---|
MatMul (const :: tensorflow::Scope & scope, :: tensorflow::Input a, :: tensorflow::Input b) | |
MatMul (const :: tensorflow::Scope & scope, :: tensorflow::Input a, :: tensorflow::Input b, const MatMul::Attrs & attrs) |
คุณลักษณะสาธารณะ | |
|---|---|
operation | |
product | |
หน้าที่สาธารณะ | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
ฟังก์ชันคงที่สาธารณะ | |
|---|---|
TransposeA (bool x) | |
TransposeB (bool x) | |
โครงสร้าง | |
|---|---|
| tensorflow::ops::MatMul::Attrs | ตัวเลือกการตั้งค่าแอตทริบิวต์สำหรับ MatMul |
คุณลักษณะสาธารณะ
การดำเนินการ
Operation operation
ผลิตภัณฑ์
::tensorflow::Output product
หน้าที่สาธารณะ
แมทมัล
MatMul( const ::tensorflow::Scope & scope, ::tensorflow::Input a, ::tensorflow::Input b )
แมทมัล
MatMul( const ::tensorflow::Scope & scope, ::tensorflow::Input a, ::tensorflow::Input b, const MatMul::Attrs & attrs )
โหนด
::tensorflow::Node * node() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต
operator::tensorflow::Input() const
ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต
operator::tensorflow::Output() const
ฟังก์ชันคงที่สาธารณะ
ทรานสโพสเอ
Attrs TransposeA( bool x )
ทรานสโพสบี
Attrs TransposeB( bool x )