If you use a Tensor multiple times, the gradient associated to it is the sum of the gradients corresponding to each use.
If you want to get the gradient for a single use, you need to make a temporary tensor corresponding to that single use.