tensorflow::ops::SparseMatMul

#include <math_ops.h>

Nhân ma trận "a" với ma trận "b".

Bản tóm tắt

Đầu vào phải là ma trận hai chiều và chiều trong của "a" phải khớp với chiều ngoài của "b". Cả "a" và "b" đều phải là Tensor chứ không phải SparseTensor . Phép toán này được tối ưu hóa cho trường hợp ít nhất một trong "a" hoặc "b" là ma trận thưa, theo nghĩa là chúng có tỷ lệ giá trị bằng 0 cao. Điểm hòa vốn khi sử dụng phép toán này so với phép nhân ma trận dày đặc trên một nền tảng là 30% giá trị bằng 0 trong ma trận thưa.

Việc tính toán đạo hàm của phép toán này chỉ tận dụng được tính thưa thớt trong đạo hàm đầu vào khi đạo hàm đó đến từ hàm ReLU .

Luận điểm:

Trả về:

Hàm khởi tạo và hàm hủy

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)

Thuộc tính công khai

operation
product

Chức năng công cộng

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

Các hàm tĩnh công khai

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

Cấu trúc

tensorflow::ops::SparseMatMul::Attrs

Các thiết lập thuộc tính tùy chọn cho SparseMatMul .

Thuộc tính công khai

hoạt động

Operation operation

sản phẩm

::tensorflow::Output product

Chức năng công cộng

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
)

nút

::tensorflow::Node * node() const 

operator::tensorflow::Input

 operator::tensorflow::Input() const 

operator::tensorflow::Output

 operator::tensorflow::Output() const 

Các hàm tĩnh công khai

AIsSparse

Attrs AIsSparse(
  bool x
)

BIsSparse

Attrs BIsSparse(
  bool x
)

Chuyển vị A

Attrs TransposeA(
  bool x
)

Chuyển vị B

Attrs TransposeB(
  bool x
)