torch.sspaddmm — PyTorch 2.7 documentation (original) (raw)

torch.sspaddmm(input, mat1, mat2, *, beta=1, alpha=1, out=None) → Tensor

Matrix multiplies a sparse tensor mat1 with a dense tensormat2, then adds the sparse tensor input to the result.

Note: This function is equivalent to torch.addmm(), exceptinput and mat1 are sparse.

Parameters

Keyword Arguments