addmv(input: Tensor, mat: Tensor, vec: Tensor, beta: _float = ..., alpha: _float = ...)Matrix-vector multiply with a scaled accumulator (BLAS-2 gemv).
Computes
,
the canonical BLAS-2 gemv operation.
Parameters
Returns
TensorVector of shape (M,).
Notes
Mathematical definition:
Implemented by promoting vec to a column (N, 1), calling
lucid.matmul, and squeezing the trailing axis.
Examples
>>> import lucid
>>> M = lucid.zeros(2)
>>> A = lucid.tensor([[1., 2.], [3., 4.]])
>>> v = lucid.tensor([5., 6.])
>>> lucid.addmv(M, A, v)
Tensor([17., 39.])