Closed renatobellotti closed 1 year ago
hi, any reason for Enzyme vs Zygote?
The questions of optimizers and AD are mostly orthogonal. Figure out how to compute gradients using AD, then pass to optim that gradient.
@dehann Yes, as far as I know only Enzyme can calculate gradients for custom kernels.
@antoine-levitt Nice, this sounds very powerful. Can you please elaborate on how to do this? I interpret the documentation [1] in the way that we either have to use finite differences or a predefined AD library. Am I mistaken?
[1] https://julianlsolvers.github.io/Optim.jl/v0.9.3/algo/autodiff/
Simply write a g(x) function that does whatever_ad(f, x) and pass it to optim as en explicit gradient
Nice, thanks! :)
Hi,
I'm looking for an optimisation library in Julia that allows to use auto-differentiation using Enzyme. I have seen that there is an option to use autodiff, but need fine-grained control. Namely, I need to propagate the autodiff through custom CPU/GPU kernels because the problem I'm solving is quite computationally expensive. I know that Enzyme can do such a thing, but is it possible to use
Enzyme.jl
withOptim.jl
?