Open mmbosschaert opened 3 weeks ago
@DhairyaLGandhi are the examples here covered by the tests you've added?
It seems like avoiding returning MTKParameters and instead returning the Tangent type might be better. I am not sure this is hitting the correct rules. I'll take a look
I have a branch SciMLSensitivity#dg/nnrev2 which should take care of the Zygote issue. ReverseDiff does still feel like it needs a little more digging into.
julia> optfn = OptimizationFunction(loss, Optimization.AutoZygote());
julia> optprob = OptimizationProblem(
optfn, rand(4), (odeprob, timesteps, data), lb=0.1zeros(4), ub=3ones(4));
julia> sol = solve(optprob, BFGS())
retcode: Success
u: 4-element Vector{Float64}:
0.8990195546222982
0.5906955967141667
0.02737487567837998
1.090967054832e-12
Describe the bug π
Changing the differentiation method in the optimization example to
AutoReverseDiff()
orAutoZygote()
yields errors.Expected behavior
To be able to use reverse differentiation.
Minimal Reproducible Example π
Error & Stacktrace β οΈ
With
AutoReverseDiff
and with
AutoZygote
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()