Skip to content

Commit b59a625

Browse files
committed
Flip ordering
1 parent 5c8a52e commit b59a625

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

docs/Project.toml

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3131
ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267"
3232
SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
3333
SciMLSensitivity = "1ed8b502-d754-442c-8d5d-10ac956f44a1"
34+
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
3435
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
3536
StochasticDiffEq = "789caeaf-c7a9-5a7d-9973-96adeb23e2a0"
3637
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

docs/src/examples/normalizing_flows.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ using ComponentArrays, DiffEqFlux, DifferentialEquations, Optimization,
1414
nn = Chain(Dense(1, 3, tanh), Dense(3, 1, tanh))
1515
tspan = (0.0f0, 10.0f0)
1616
17-
ffjord_mdl = FFJORD(nn, tspan, (1,), Tsit5())
17+
ffjord_mdl = FFJORD(nn, tspan, (1,), Tsit5(); ad = AutoZygote())
1818
ps, st = Lux.setup(Random.default_rng(), ffjord_mdl)
1919
ps = ComponentArray(ps)
2020
model = Lux.Experimental.StatefulLuxLayer(ffjord_mdl, nothing, st)
@@ -33,7 +33,7 @@ function cb(p, l)
3333
return false
3434
end
3535
36-
adtype = Optimization.AutoZygote()
36+
adtype = Optimization.AutoForwardDiff()
3737
optf = Optimization.OptimizationFunction((x, p) -> loss(x), adtype)
3838
optprob = Optimization.OptimizationProblem(optf, ps)
3939
@@ -68,7 +68,7 @@ using ComponentArray, DiffEqFlux, DifferentialEquations, Optimization,
6868
nn = Chain(Dense(1, 3, tanh), Dense(3, 1, tanh))
6969
tspan = (0.0f0, 10.0f0)
7070
71-
ffjord_mdl = FFJORD(nn, tspan, (1,), Tsit5())
71+
ffjord_mdl = FFJORD(nn, tspan, (1,), Tsit5(); ad = AutoZygote())
7272
ps, st = Lux.setup(Random.default_rng(), ffjord_mdl)
7373
ps = ComponentArray(ps)
7474
model = Lux.Experimental.StatefulLuxLayer(ps, st, ffjord_mdl)
@@ -109,7 +109,7 @@ Here we showcase starting the optimization with `Adam` to more quickly find a mi
109109

110110
```@example cnf2
111111
112-
adtype = Optimization.AutoZygote()
112+
adtype = Optimization.AutoForwardDiff()
113113
optf = Optimization.OptimizationFunction((x, p) -> loss(x), adtype)
114114
optprob = Optimization.OptimizationProblem(optf, ps)
115115

0 commit comments

Comments
 (0)