In numpy I can do a simple matrix multiplication like this:
a = numpy.arange(2*3).reshape(3,2) b = numpy.arange(2).reshape(2,1) print(a) print(b) print(a.dot
You can use "@" for computing a dot product between two tensors in pytorch.
a = torch.tensor([[1,2], [3,4]]) b = torch.tensor([[5,6], [7,8]]) c = a@b #For dot product c d = a*b #For elementwise multiplication d