chainer.functions.sparse_matmul¶
-
chainer.functions.
sparse_matmul
(a, b, transa=False, transb=False)[source]¶ Computes the batched multiplication of sparse and dense matrix.
The following use cases are supported:
- C (dense) = A (sparse) * B (dense)
- C (dense) = A (dense) * B (sparse)
Parameters: Returns: Result of batched mat-mul.
Return type: See also
See
to_coo()
for how to construct a COO matrix from an array.Note
Performance of this function on GPU can be improved by using the
order
argument ofCooMatrix
when the sparse matrix is created.