How to multiply row-wise by scalar in pytorch?
2
When I have a tensor m of shape [12, 10] and a vector s of scalars with shape [12] , how can I multiply each row of m with the corresponding scalar in s ?
pytorch tensor scalar
share | improve this question
edited Jan 1 at 6:18
Shai
70.2k 23 137 246
asked Dec 31 '18 at 13:11
Chris Chris
400 5 26
add a comment |