# Is there a way to compute the AD Hessian of a function using purely Zygote functions and not ForwardDiff?

**URL:** https://discourse.julialang.org/t/is-there-a-way-to-compute-the-ad-hessian-of-a-function-using-purely-zygote-functions-and-not-forwarddiff/52704
**Category:** Optimization (Mathematical)
**Created:** [January 1, 2021, 6:45pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-compute-the-ad-hessian-of-a-function-using-purely-zygote-functions-and-not-forwarddiff/52704 "2021-01-01T18:45:37Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)
#### Post date: [January 1, 2021, 7:01pm UTC](https://discourse.julialang.org/t/is-there-a-way-to-compute-the-ad-hessian-of-a-function-using-purely-zygote-functions-and-not-forwarddiff/52704/2 "2021-01-01T19:01:19Z")

</div>

As mentioned in [Gradient of Gradient in Zygote - #3 by ChrisRackauckas](https://discourse.julialang.org/t/gradient-of-gradient-in-zygote/52685/3), Zygote has known issues with nested which are set to be fixed with Diffractor.jl. I would just avoid doing this because you’ll run into other issues. ForwardDiff already works with complex numbers and making it work with FFTs is pretty easy, so that’s a very straightforward path for your actual problem.

---

_[View the full topic](https://discourse.julialang.org/t/is-there-a-way-to-compute-the-ad-hessian-of-a-function-using-purely-zygote-functions-and-not-forwarddiff/52704)._
