Skip to content

Commit e4d08c6

Browse files
authored
Update gray-scott.md
Final Fix
1 parent 7300535 commit e4d08c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

docs/src/examples/pde/gray-scott.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,16 @@ optf = OptimizationFunction((θ, p) -> loss_fn(θ), Optimization.AutoZygote())
403403
optprob = OptimizationProblem(optf, ps)
404404
405405
# Solve using Adam
406-
res = solve(optprob, Optimisers.Adam(0.001); maxiters=5000, callback=training_callback)
406+
res = solve(optprob, Optimisers.Adam(0.003); maxiters=10000, callback=training_callback)
407+
res.objective
407408
```
408409

409410
## Results and conclusion
410411
We can visualize the final results of the UDE and the ground-truth data with the following code.
411412

412413
```@example gray_scott
413414
# Final model prediction and plot
414-
sol_pred = solve(prob_ude, FBDF(), saveat=tsteps, abstol=1e-6, reltol=1e-6)
415+
sol_pred = solve(prob_ude, FBDF(), saveat=tsteps, p = res.u, abstol=1e-6, reltol=1e-6)
415416
pred_u = [mean(s[:, :, 1]) for s in sol_pred.u]
416417
417418
using Plots

0 commit comments

Comments
 (0)