torch.sparse.addmm¶
-
torch.sparse.
addmm
(mat, mat1, mat2, beta=1.0, alpha=1.0)[source]¶ This function does exact same thing as
torch.addmm()
in the forward, except that it supports backward for sparse matrixmat1
.mat1
need to have sparse_dim = 2. Note that the gradients ofmat1
is a coalesced sparse tensor.