Solved by albanD in post #4 
              
              
                Hi, 
When implemented in python, a forward/backward pair is defined by a Function. You can see here in the doc how in details. 
By default, if higher order derivatives are required, the autograd is applied to the backward function that is defined. 
You can manually defined second derivatives by usin…