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

#include <math_ops.h>

คูณเทนเซอร์สองตัวเป็นชุด

สรุป

คูณชิ้นส่วนทั้งหมดของ Tensor x และ y (แต่ละชิ้นสามารถดูได้เป็นองค์ประกอบของชุด) และจัดเรียงผลลัพธ์แต่ละรายการในเทนเซอร์เอาต์พุตเดี่ยวที่มีขนาดชุดเดียวกัน แต่ละชิ้นสามารถเลือกที่จะติดกัน (เพื่อติดเมทริกซ์หมายถึงการย้ายและคอนจูเกต) ก่อนการคูณโดยการตั้งค่าแฟล็ก adj_x หรือ adj_y เป็น True ซึ่งตามค่าเริ่มต้นจะเป็น False

เทนเซอร์อินพุต x และ y เป็น 2-D หรือสูงกว่าโดยมีรูปร่าง [..., r_x, c_x] และ [..., r_y, c_y]

เทนเซอร์เอาท์พุตเป็น 2-D หรือสูงกว่าที่มีรูปร่าง [..., 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: 2-D หรือสูงกว่าที่มีรูปร่าง [..., r_x, c_x]
  • y: 2-D หรือสูงกว่าที่มีรูปร่าง [..., r_y, c_y]

แอ็ตทริบิวต์ทางเลือก (ดู Attrs ):

  • adj_x: ถ้าเป็น True ให้ติดส่วนของ x ค่าเริ่มต้นเป็น False
  • adj_y: หากเป็น True ให้ติดส่วนของ y ค่าเริ่มต้นเป็น False

ผลตอบแทน:

  • Output : 3-D หรือสูงกว่าที่มีรูปร่าง [..., 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)

โครงสร้าง

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

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

 operator::tensorflow::Input() const 

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

 operator::tensorflow::Output() const 

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

AdjX

Attrs AdjX(
  bool x
)

ปรับป

Attrs AdjY(
  bool x
)