I am trying to take the gradient of a tensor. The value of that tensor is calculated using another gradient. That usually works, but I just encountered an error when the gradien