Skip to content

Commit 99c3370

Browse files
authored
fix: missing Layers
1 parent 42fe746 commit 99c3370

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/src/examples/hamiltonian_nn.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dataloader = ncycle(
3333
for i in 1:(size(data, 2) ÷ B)),
3434
NEPOCHS)
3535
36-
hnn = HamiltonianNN(Chain(Dense(2 => 64, relu), Dense(64 => 1)); ad = AutoZygote())
36+
hnn = Layers.HamiltonianNN(Chain(Dense(2 => 64, relu), Dense(64 => 1)); ad = AutoZygote())
3737
ps, st = Lux.setup(Xoshiro(0), hnn)
3838
ps_c = ps |> ComponentArray
3939
@@ -95,12 +95,12 @@ dataloader = ncycle(
9595
NEPOCHS)
9696
```
9797

98-
### Training the HamiltonianNN
98+
### Training the
9999

100-
We parameterize the HamiltonianNN with a small MultiLayered Perceptron. HNNs are trained by optimizing the gradients of the Neural Network. Zygote currently doesn't support nesting itself, so we will be using ForwardDiff in the training loop to compute the gradients of the HNN Layer for Optimization.
100+
We parameterize the with a small MultiLayered Perceptron. HNNs are trained by optimizing the gradients of the Neural Network. Zygote currently doesn't support nesting itself, so we will be using ForwardDiff in the training loop to compute the gradients of the HNN Layer for Optimization.
101101

102102
```@example hamiltonian
103-
hnn = HamiltonianNN(Chain(Dense(2 => 64, relu), Dense(64 => 1)); ad = AutoZygote())
103+
hnn = Layers.HamiltonianNN(Chain(Dense(2 => 64, relu), Dense(64 => 1)); ad = AutoZygote())
104104
ps, st = Lux.setup(Xoshiro(0), hnn)
105105
ps_c = ps |> ComponentArray
106106

0 commit comments

Comments
 (0)