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
The cost function returned by multiple_shooting_objective is not differentiable by Zygote, which prevents using the AutoZygote AD setting in optimisation.
Expected behavior
Zygote succesfully computes the gradient of the cost function.
The optimisation finishes succesfully.
Julia Version 1.9.2
Commit e4ee485e90 (2023-07-0509:39 UTC)
Platform Info:
OS: Linux (x86_64-redhat-linux)
CPU:24×12th Gen Intel(R) Core(TM) i9-12950HX
WORD_SIZE:64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, alderlake)
Threads:18 on 24 virtual cores
Environment:
JULIA_NUM_THREADS =18
Additional context
A little bit unrelated, but the model I'm trying to identify has 5 states and 38 parameters + 5*365=1825 parameters for starting points. Is it faster to use AutoZygote or AutoForwardDiff in this case? I'd think AutoForwardDiff is fast enough due to the small number of states but it seems slow and I have not been able to compare it with AutoZygote due to this bug.
The text was updated successfully, but these errors were encountered:
I have been testing more about this issue.
I have the same error.
If we change the value of the initial condition to vcat(zeros(2), pguess) the error is
ERROR: Mutating arrays is not supported -- called push!(Vector{Float64}, ...)
This error occurs when you ask Zygote to differentiate operations that change
the elements of arrays in place (e.g. setting values with x .= ...)
Possible fixes:
- avoid mutating operations (preferred)
- or read the documentation and solutions for this error
https://fluxml.ai/Zygote.jl/latest/limitations
Describe the bug 🐞
The cost function returned by
multiple_shooting_objective
is not differentiable by Zygote, which prevents using the AutoZygote AD setting in optimisation.Expected behavior
Zygote succesfully computes the gradient of the cost function.
The optimisation finishes succesfully.
Minimal Reproducible Example 👇
Error & Stacktrace⚠️
The stacktrace was too long to paste here. Error is shown below
Environment (please complete the following information):
using Pkg; Pkg.status()
using Pkg; Pkg.status(; mode = PKGMODE_MANIFEST)
versioninfo()
Additional context
A little bit unrelated, but the model I'm trying to identify has 5 states and 38 parameters + 5*365=1825 parameters for starting points. Is it faster to use AutoZygote or AutoForwardDiff in this case? I'd think AutoForwardDiff is fast enough due to the small number of states but it seems slow and I have not been able to compare it with AutoZygote due to this bug.
The text was updated successfully, but these errors were encountered: