Matmul#
Matmul 操作计算
\( C[M, N] = A[M, K] * B[K, N] \)
输入维度的最后两个维度被解释为 M、N、K。所有其他前面的维度都被解释为批次维度。该操作还具有广播功能,详见cuDNN 后端 Matmul 操作。
C++ API#
std::shared_ptr<Tensor_attributes>
Matmul(std::shared_ptr<Tensor_attributes> a, std::shared_ptr<Tensor_attributes> b, Matmul_attributes);
Matmul 属性是一个带有 setter 的轻量级结构
Matmul_attributes&
set_name(std::string const&)
Matmul_attributes&
set_compute_data_type(DataType_t value)
Python API#
matmul
A
B
名称
compute_data_type