Use `autodiff_deferred` for the inner gradient in Enzyme hessian
Vaibhavdixit02 opened this issue · comments
I think this might reduce the number of failure cases of second-order with Enzyme. Looking at the code this change didn't seem straightforward, hence just opening an issue and not a PR :)
Thanks! Do you have examples of second order Enzyme use? The only one I know is in the JuMP documentation
Thanks, working on it. I think I'll have to define a custom hvp
function for Enzyme over Enzyme.
I would love to get your input on https://discourse.julialang.org/t/second-order-autodiff-which-combinations-should-work/114892
Other link for Enzyme: https://jump.dev/JuMP.jl/stable/tutorials/nonlinear/operator_ad/#Hessian-3