Matrix multiplication in pyTorch
I'm writing a simple neural network in pyTorch, where features and weights both are (1, 5) tensors. What are the differences between the two methods that I mention below?

y = activation(torch.sum(features*weights) + bias)


and

yy = activation(torch.mm(features, weights.view(5,1)) + bias)


Consider it step by step:

x = torch.tensor([[10, 2], [3,5]])
y = torch.tensor([[1,3], [5,6]])

x * y
# tensor([[10,  6],
#         [15, 30]])

torch.sum(x*y)

#tensor(61)

x = torch.tensor([[10, 2], [3,5]])
y = torch.tensor([[1,3], [5,6]])

np.matmul(x, y)
# array([[20, 42],
#       [28, 39]])


So there is a difference betweeen matmul and * operator. Furthermore, torch.sum makes an entire sum from the tensor, not row or columnwisely. 
