Skip to content

Commit

Permalink
reduce maxiters
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Nov 20, 2023
1 parent b59a625 commit 1d79acf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions docs/src/examples/normalizing_flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ adtype = Optimization.AutoForwardDiff()
optf = Optimization.OptimizationFunction((x, p) -> loss(x), adtype)
optprob = Optimization.OptimizationProblem(optf, ps)
res1 = Optimization.solve(optprob, Adam(0.1); maxiters = 100, callback = cb)
res1 = Optimization.solve(optprob, Adam(0.1); maxiters = 20, callback = cb)
optprob2 = Optimization.OptimizationProblem(optf, res1.u)
res2 = Optimization.solve(optprob2, Optim.LBFGS(); allow_f_increases = false,
Expand Down Expand Up @@ -113,8 +113,7 @@ adtype = Optimization.AutoForwardDiff()
optf = Optimization.OptimizationFunction((x, p) -> loss(x), adtype)
optprob = Optimization.OptimizationProblem(optf, ps)
res1 = Optimization.solve(optprob, Adam(0.1); maxiters = 100,
callback = cb)
res1 = Optimization.solve(optprob, Adam(0.1); maxiters = 20, callback = cb)
```

We then complete the training using a different optimizer, starting from where `Adam` stopped.
Expand Down

0 comments on commit 1d79acf

Please sign in to comment.