You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have started trying out Enzyme.jl for some applications. A lot of things already seem to be working nicely!
This is a pattern that is used quite often to convert from named parameters to vectors and applying transformations for optimization (e.g. in ParameterHandling.jl). Here is a M(n)WE:
using Enzyme
f(par::NamedTuple) = par.a * par.b + par.c
par = (a =1., b =2., c =3.)
autodiff(Reverse, f, Active(par)) # works beautifully and efficientlyunpack_vector(vec::Vector) = (a = vec[1], b = vec[2], c = vec[3])
vec = [1., 2., 3.]
autodiff(Reverse, f ∘ unpack_vector, Active(vec)) # ERROR: Conversion of boxed type Vector{Float64} is not allowed
In a slightly different example, sometimes the error reads ERROR: Duplicated Returns not yet handled.
The text was updated successfully, but these errors were encountered:
I have started trying out Enzyme.jl for some applications. A lot of things already seem to be working nicely!
This is a pattern that is used quite often to convert from named parameters to vectors and applying transformations for optimization (e.g. in ParameterHandling.jl). Here is a M(n)WE:
In a slightly different example, sometimes the error reads
ERROR: Duplicated Returns not yet handled
.The text was updated successfully, but these errors were encountered: