Skip to content

Commit 0c26379

Browse files
Merge pull request #964 from SciML/ChrisRackauckas-patch-1
Test master
2 parents e1adcdc + bdd8988 commit 0c26379

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/src/examples/GPUs.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,15 @@ predict_neuralode(p) = reduce(hcat, first(prob_neuralode(u0, p, st)).u)
106106
function loss_neuralode(p)
107107
pred = predict_neuralode(p)
108108
loss = sum(abs2, ode_data .- pred)
109-
return loss, pred
109+
return loss
110110
end
111111
# Callback function to observe training
112112
list_plots = []
113113
iter = 0
114-
callback = function (p, l, pred; doplot = false)
114+
callback = function (state, l; doplot = false)
115+
p = state.u
115116
global list_plots, iter
117+
pred = predict_neuralode(p)
116118
if iter == 0
117119
list_plots = []
118120
end

0 commit comments

Comments
 (0)