you update t, but the t’ carries the gradient, and then you update f with the new t, it’s like the t’ should bring the computation you’ve done previously. I think autograd.grad() is not a good approach to do this, as you have to manually call this for each variable involved, which is tedious?