Solved by ptrblck in post #2 
              
              
                The differences you are seeing are approx. 1e-6 which comes most likely due to the limited floating point precision of float32. 
The order of operations might yield different results as seen here: 
x = torch.randn(10, 10, 10)
s1 = x.sum()
s2 = x.sum(0).sum(0).sum(0)
print((s1 - s2).abs().max())
> te…