Thank you, I have been looking for an example on how to use autograd api. IMO, a small example of using autograd.grad api should be added to pytorch doc. Furthermore, examples of higher-order derivatives would help as well. Say, for example Double Backpropagation, especially since loss.backward(create_graph=True) no longer works, causing memory leak due to some changes in C++ backend(weak to strong pointers), issue page 53.