Shortcuts

torch.sspaddmm

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

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

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

Parameters:
  • input (Tensor) – a sparse matrix to be added

  • mat1 (Tensor) – a sparse matrix to be matrix multiplied

  • mat2 (Tensor) – a dense matrix to be matrix multiplied

Keyword Arguments:
  • beta (Number, optional) – multiplier for mat (β\beta)

  • alpha (Number, optional) – multiplier for mat1@mat2mat1 @ mat2 (α\alpha)

  • out (Tensor, optional) – the output tensor.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources