Custom rule for differentiating through Newton solver using ForwardDiff: works for gradient, fails for hessian

You may find GitHub - gdalle/ImplicitDifferentiation.jl: Automatic differentiation of implicit functions and GitHub - ThummeTo/ForwardDiffChainRules.jl useful.

1 Like