This would require a custom Enzyme rule in Integrals.jl that no one has implemented yet. In general, reverse mode autodiff over adaptive quadrature isn’t widely available, neither in Julia nor elsewhere as far as I know. However, Integrals.jl does provide a rule for Zygote/ChainRules, so maybe try Zygote?
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| When Zygote.jl meets Quadgk.jl: Mutating arrays is not supported -- called setindex!(::Vector{QuadGK.Segment}) | 6 | 812 | July 12, 2022 | |
| Any faster way of computing small gradients? | 21 | 2085 | August 11, 2022 | |
| Reliability of Enzyme.jl | 11 | 2121 | October 23, 2022 | |
| Autodiff of vector inputs with Enzyme.jl (and possibly Optimization.jl) | 9 | 1146 | August 16, 2023 | |
| Enzyme not working | 10 | 439 | July 23, 2024 |