เทนเซอร์โฟลว์:: ปฏิบัติการ:: แมทมัล

#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)

โครงสร้าง

เทนเซอร์โฟลว์ :: 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 

ตัวดำเนินการ::tensorflow::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::tensorflow::เอาต์พุต

 operator::tensorflow::Output() const 

ฟังก์ชันคงที่สาธารณะ

ย้ายA

Attrs TransposeA(
 
bool x
)

ทรานโพสบี

Attrs TransposeB(
 
bool x
)