I have a 1D tensor of shape [15] and a 2D tensor of shape [15,6].

I want to multiply each member of the vector to the corresponding row in the matrix, i.e. v[0]*m[0,:], v[1]*m[1,:] … v[14]*m[14,:]. So the output is of shape [15,6].

Is there a way to do it in pytorch without looping through the vector and the matrix.