Hi,
When you do h = xxx in python, you associate the python object xxx to the name h. And the old python object that h was pointing to is discarded.
That being said. The gradient computation for the different Tensors will still be computed properly. What is the exact issue you’re seeing here?