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
opt_state = Optimization.OptimizationState(; iter = i,
82
-
u = θ,
83
-
objective =first(x),
84
-
grad = gₜ,
85
-
original =nothing)
86
-
cb_call = cache.callback(θ, x...)
87
-
if!(cb_call isa Bool)
88
-
error("The callback should return a boolean `halt` for whether to stop the optimization process. Please see the sciml_train documentation for information.")
89
-
elseif cb_call
90
-
break
91
-
end
92
-
mₜ = βs[1] .* mₜ + (1- βs[1]) .* gₜ
78
+
for _ in1:maxiters
79
+
for (i, d) inenumerate(data)
80
+
f.grad(gₜ, θ, d)
81
+
x = cache.f(θ, cache.p, d...)
82
+
opt_state = Optimization.OptimizationState(; iter = i,
83
+
u = θ,
84
+
objective =first(x),
85
+
grad = gₜ,
86
+
original =nothing)
87
+
cb_call = cache.callback(θ, x...)
88
+
if!(cb_call isa Bool)
89
+
error("The callback should return a boolean `halt` for whether to stop the optimization process. Please see the sciml_train documentation for information.")
0 commit comments