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
Copy file name to clipboardexpand all lines: lib/OptimizationOptimisers/src/OptimizationOptimisers.jl
+10-2
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,11 @@ function SciMLBase.__solve(cache::OptimizationCache{
67
67
for (i, d) inenumerate(data)
68
68
cache.f.grad(G, θ, d...)
69
69
x = cache.f(θ, cache.p, d...)
70
-
opt_state = Optimization.OptimizationState(iteration = i, u = θ, objective = x[1], gradient = G, solver_state = state)
70
+
opt_state = Optimization.OptimizationState(iteration = i,
71
+
u = θ,
72
+
objective = x[1],
73
+
gradient = G,
74
+
solver_state = state)
71
75
cb_call = cache.callback(opt_state, x...)
72
76
if!(cb_call isa Bool)
73
77
error("The callback should return a boolean `halt` for whether to stop the optimization process. Please see the `solve` documentation for information.")
@@ -88,7 +92,11 @@ function SciMLBase.__solve(cache::OptimizationCache{
88
92
x = min_err
89
93
θ = min_θ
90
94
cache.f.grad(G, θ, d...)
91
-
opt_state = Optimization.OptimizationState(iteration = i, u = θ, objective = x[1], gradient = G, solver_state = state)
95
+
opt_state = Optimization.OptimizationState(iteration = i,
0 commit comments