I’m designing an Optimizer that needs to compute the 2nd derivative of parameters. but when I print the p.grad.grad it I got None,
for group in self.param_groups:
    for p in group['params']: 
        grads2 = p.grad.grad
 

Has there any method to solve this?
Thank you.