diff --git a/docs/source/sparse.rst b/docs/source/sparse.rst index 37c607496a5..178e4cb1860 100644 --- a/docs/source/sparse.rst +++ b/docs/source/sparse.rst @@ -590,6 +590,7 @@ Torch functions specific to sparse Tensors sparse_csr_tensor sparse.sum sparse.addmm + sparse.sampled_addmm sparse.mm sspaddmm hspmm diff --git a/torch/sparse/__init__.py b/torch/sparse/__init__.py index fea6dcfc09c..ba4156019e6 100644 --- a/torch/sparse/__init__.py +++ b/torch/sparse/__init__.py @@ -98,7 +98,9 @@ Performs a matrix multiplication of the dense matrices :attr:`mat1` and :attr:`m specified by the sparsity pattern of :attr:`input`. The matrix :attr:`input` is added to the final result. Mathematically this performs the following operation: + .. math:: + \text{out} = \alpha\ (\text{mat1} \mathbin{@} \text{mat2})*\text{spy}(\text{input}) + \beta\ \text{input} where :math:`\text{spy}(\text{input})` is the sparsity pattern matrix of :attr:`input`, :attr:`alpha`