PyTorch dot product does not work for some cases
I am struggling with an issue I cannot solve in PyTorch code.  My task is simple: just get the inner product of two tensors.  However, the output becomes zero in certain cases instead of returning the correct value.

For example, the code below demonstrates the issue.

a = torch.tensor([3,1])
b = torch.tensor([3.,1.])
a.dot(a)  # this returns 10, which is correct
b.dot(b)  # this returns 0., which is not correct


I am using PyTorch version 1.2 and this has never happened to me before...  Is there something simple that I am missing around the way I define the tensors?

Thank you for your time!

I just ran the same code using torch version '1.0.1.post2' and saw the results tensor(10)and tensor(10.) respectively for a.dot(a) and b.dot(b). Please confirm if you are missing something else in the code.
