Solved by ptrblck in post #2 
              
              
                PyTorch supports numpy’s broadcasting. Have a look at this explanation. 
Numpy should show the same behavior: 
a = np.random.randn(10, 3)
b = np.random.randn(10, 1)
c = a * b
print(c.shape)
>> (10, 3)