# Second order gradient with Lux, Zygote, CUDA, Enzyme

**URL:** <https://discourse.julialang.org/t/second-order-gradient-with-lux-zygote-cuda-enzyme/124301>\
**Category:** Machine Learning\
**Created:** [December 31, 2024, 6:56am UTC](https://discourse.julialang.org/t/second-order-gradient-with-lux-zygote-cuda-enzyme/124301 "2024-12-31T06:56:10Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![avikpal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/avikpal/32/6550_2.png) [@avikpal](https://discourse.julialang.org/u/avikpal)\
**Post date:** [December 31, 2024, 5:35pm UTC](https://discourse.julialang.org/t/second-order-gradient-with-lux-zygote-cuda-enzyme/124301/6 "2024-12-31T17:35:14Z")

</div>

Lux swaps in ForwardDiff for nested AD with Zygote ([Nested AD with Lux etc](https://discourse.julialang.org/t/nested-ad-with-lux-etc/113573)) and that will fail here without a ForwardDiff.Dual overload

---

_[View the full topic](https://discourse.julialang.org/t/second-order-gradient-with-lux-zygote-cuda-enzyme/124301)._
