Adding the transposed version to a tensor in place (+=) produces inconsistent results.
Is it expected?
>>> tt = torch.arange(16).view(4,4)
>>> tt
tensor([[ 0., 1., 2., 3.],
[ 4., 5., 6., 7.],
[ 8., 9., 10., 11.],
[ 12., 13., 14., 15.]])
>>> tt.t()
tensor([[ 0., 4., 8., 12.],
[ 1., 5., 9., 13.],
[ 2., 6., 10., 14.],
[ 3., 7., 11., 15.]])
>>> tt + tt.t()
tensor([[ 0., 5., 10., 15.],
[ 5., 10., 15., 20.],
[ 10., 15., 20., 25.],
[ 15., 20., 25., 30.]])
>>> tt += tt.t()
>>> tt
tensor([[ 0., 5., 10., 15.],
[ 9., 10., 15., 20.],
[ 18., 24., 20., 25.],
[ 27., 33., 39., 30.]])
Version 0.4 on Ubuntu 16.04.