Floating point numbers have a limited precision, which results in these small differences.
If you need more precision for whatever reason, you could cast your tensors to .double().
Have a look at this nice blog post 6 about floating point precision.