Skip to content

Commit 1057063

Browse files
Merge pull request #741 from Algopaul/patch-1
Fix latex typos in Hamiltonian Neural Network Tutorial
2 parents 3d6dca8 + 9fba604 commit 1057063

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/examples/hamiltonian_nn.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Hamiltonian Neural Networks introduced in [1] allow models to "learn and respect exact conservation laws in an unsupervised manner". In this example, we will train a model to learn the Hamiltonian for a 1D Spring mass system. This system is described by the equation:
44

55
```math
6-
m\ddot(x) + kx = 0
6+
m\ddot x + kx = 0
77
```
88

99
Now we make some simplifying assumptions, and assign ``m = 1`` and ``k = 1``. Analytically solving this equation, we get ``x = sin(t)``. Hence, ``q = sin(t)``, and ``p = cos(t)``. Using these solutions we generate our dataset and fit the `NeuralHamiltonianDE` to learn the dynamics of this system.
@@ -63,7 +63,7 @@ ylabel!("Momentum (p)")
6363

6464
### Data Generation
6565

66-
The HNN predicts the gradients ``(\dot(q), \dot(p))`` given ``(q, p)``. Hence, we generate the pairs ``(q, p)`` using the equations given at the top. Additionally to supervise the training we also generate the gradients. Next we use use Flux DataLoader for automatically batching our dataset.
66+
The HNN predicts the gradients ``(\dot q, \dot p)`` given ``(q, p)``. Hence, we generate the pairs ``(q, p)`` using the equations given at the top. Additionally to supervise the training we also generate the gradients. Next we use use Flux DataLoader for automatically batching our dataset.
6767

6868
```@example hamiltonian
6969
using Flux, DiffEqFlux, DifferentialEquations, Statistics, Plots, ReverseDiff

0 commit comments

Comments
 (0)