Mv
torch_mv(self, vec)
self
: (Tensor) matrix to be multipliedvec
: (Tensor) vector to be multipliedThis function does not broadcast .
Performs a matrix-vector product of the matrix input
and the vector vec
.
If input
is a tensor, vec
is a 1-D tensor of size , out
will be 1-D of size .
if (torch_is_installed()) { mat = torch_randn(c(2, 3)) vec = torch_randn(c(3)) torch_mv(mat, vec) }
Useful links