Skip to content

Commit efd1f23

Browse files
Fix up ActivationFunction definitions
1 parent b0b1494 commit efd1f23

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

docs/src/examples/collocation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ savefig("colloc.png")
3131
plot(tsteps,du')
3232
savefig("colloc_du.png")
3333
34-
dudt2 = Lux.Chain(ActivationFunction(x -> x.^3),
34+
dudt2 = Lux.Chain(ActivationFunction(x -> x^3),
3535
Lux.Dense(2, 50, tanh),
3636
Lux.Dense(50, 2))
3737
@@ -134,7 +134,7 @@ calculates the squared difference between `f(u,p,t)` and `u'` at each
134134
point, and find the parameters which minimize this difference:
135135

136136
```@example collocation
137-
dudt2 = Lux.Chain(ActivationFunction(x -> x.^3),
137+
dudt2 = Lux.Chain(ActivationFunction(x -> x^3),
138138
Lux.Dense(2, 50, tanh),
139139
Lux.Dense(50, 2))
140140

docs/src/examples/multiple_shooting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ ode_data = Array(solve(prob_trueode, Tsit5(), saveat = tsteps))
4141

4242

4343
# Define the Neural Network
44-
nn = Lux.Chain(ActivationFunction(x -> x.^3),
44+
nn = Lux.Chain(ActivationFunction(x -> x^3),
4545
Lux.Dense(2, 16, tanh),
4646
Lux.Dense(16, 2))
4747
p_init, st = Lux.setup(rng, nn)

docs/src/examples/neural_ode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ end
2828
prob_trueode = ODEProblem(trueODEfunc, u0, tspan)
2929
ode_data = Array(solve(prob_trueode, Tsit5(), saveat = tsteps))
3030
31-
dudt2 = Lux.Chain(ActivationFunction(x -> x.^3),
31+
dudt2 = Lux.Chain(ActivationFunction(x -> x^3),
3232
Lux.Dense(2, 50, tanh),
3333
Lux.Dense(50, 2))
3434
p, st = Lux.setup(rng, dudt2)
@@ -110,7 +110,7 @@ the layer. Here we're going to use `Lux.Chain`, which is a suitable neural netwo
110110
structure for NeuralODEs with separate handling of state variables:
111111

112112
```@example neuralode
113-
dudt2 = Lux.Chain(ActivationFunction(x -> x.^3),
113+
dudt2 = Lux.Chain(ActivationFunction(x -> x^3),
114114
Lux.Dense(2, 50, tanh),
115115
Lux.Dense(50, 2))
116116
p, st = Lux.setup(rng, dudt2)

0 commit comments

Comments
 (0)