Hi,
The difference is that:


a = a - 5 will create a new tensor that contains the result of a - 5 and then set the variable a to point to that new Tensor.

a -= 5 will change the Tensor pointed by a inplace and by doing a - 5 and saving it in the original Tensor.