Hi SimonW,
Thanks for your reply! Now I know how to obtain gradient for every step.
But I’m still wondering, after I changed x0 for every step, when I do backward and apply gradient to variables by step(), still the original x0 (first defined x0) will be updated but just I can’t print out its gradient, right?