Closed NilsNiggemann closed 1 year ago
julia> optimize(x->g(x[1]),[0.], AcceleratedGradientDescent())
* Status: success
* Candidate solution
Final objective value: -1.000000e+00
* Found with
Algorithm: Accelerated Gradient Descent
* Convergence measures
|x - x'| = 1.13e-07 ≰ 0.0e+00
|x - x'|/|x'| = 3.59e-08 ≰ 0.0e+00
|f(x) - f(x')| = 1.28e-14 ≰ 0.0e+00
|f(x) - f(x')|/|f(x')| = 1.28e-14 ≰ 0.0e+00
|g(x)| = 0.00e+00 ≤ 1.0e-08
* Work counters
Seconds run: 0 (vs limit Inf)
Iterations: 5
f(x) calls: 36
∇f(x) calls: 36
strange, it happens when you use the method keyword only..
of course. I get it. It's because the function that's at fault is only used in the kwargs version.
I'll post a patch release
MWE: This works on 1.7.4 but not on 1.7.5. The same error also occurs for MomentumGradientDescent(), but not the other solvers
Edit: Checked on Julia 1.8.5 and 1.9.0-rc1