tensorflow::ops::SparseMatMul

#include <math_ops.h>

คูณเมท ริกซ์ "a" ด้วยเมทริกซ์ "b"

สรุป

อินพุตต้องเป็นเมทริกซ์สองมิติ และมิติภายในของ "a" ต้องตรงกับมิติภายนอกของ "b" ทั้ง "a" และ "b" ต้องเป็น Tensor ไม่ใช่ SparseTensor การดำเนินการนี้ได้รับการปรับให้เหมาะสมสำหรับกรณีที่อย่างน้อยหนึ่งใน "a" หรือ "b" เป็นเมทริกซ์แบบสปาร์ส กล่าวคือ มีค่าศูนย์จำนวนมาก จุดคุ้มทุนสำหรับการใช้งานนี้เมื่อเทียบกับการคูณเมทริกซ์แบบหนาแน่นบนแพลตฟอร์มหนึ่งคือ 30% ของค่าศูนย์ในเมทริกซ์แบบสปาร์ส

การคำนวณเกรเดียนต์ของการดำเนินการนี้จะใช้ประโยชน์จากความเบาบางของเกรเดียนต์อินพุตก็ต่อเมื่อเกรเดียนต์นั้นมาจาก ReLU เท่านั้น

ข้อโต้แย้ง:

การส่งคืนสินค้า:

  • Output : เทนเซอร์ผลคูณ

ตัวสร้างและตัวทำลาย

SparseMatMul (const :: tensorflow::Scope & scope, :: tensorflow::Input a, :: tensorflow::Input b)
SparseMatMul (const :: tensorflow::Scope & scope, :: tensorflow::Input a, :: tensorflow::Input b, const SparseMatMul::Attrs & attrs)

คุณลักษณะสาธารณะ

operation
product

หน้าที่สาธารณะ

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

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

AIsSparse (bool x)
BIsSparse (bool x)
TransposeA (bool x)
TransposeB (bool x)

โครงสร้าง

tensorflow::ops::SparseMatMul::Attrs

ตัวเลือกการตั้งค่าแอตทริบิวต์สำหรับ SparseMatMul ( ไม่จำเป็น)

คุณลักษณะสาธารณะ

การดำเนินการ

Operation operation

ผลิตภัณฑ์

::tensorflow::Output product

หน้าที่สาธารณะ

SparseMatMul

 SparseMatMul(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input a,
  ::tensorflow::Input b
)

SparseMatMul

 SparseMatMul(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input a,
  ::tensorflow::Input b,
  const SparseMatMul::Attrs & attrs
)

โหนด

::tensorflow::Node * node() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::อินพุต

 operator::tensorflow::Input() const 

ตัวดำเนินการ::เทนเซอร์โฟลว์::เอาต์พุต

 operator::tensorflow::Output() const 

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

AIsparse

Attrs AIsSparse(
  bool x
)

BIsSparse

Attrs BIsSparse(
  bool x
)

ทรานสโพสเอ

Attrs TransposeA(
  bool x
)

ทรานสโพสบี

Attrs TransposeB(
  bool x
)