Skip to content

Commit

Permalink
Merge pull request #94 from JuliaGNI/add_number_of_network_parameters
Browse files Browse the repository at this point in the history
Added comment on parameterlength and extended the corresponding function in ANN.
  • Loading branch information
michakraus authored Dec 12, 2023
2 parents 19772eb + 99d41e1 commit 858d440
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/src/tutorials/sympnet_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,16 @@ g_nn = NeuralNetwork(gsympnet, backend, type)
nothing # hide
```

If we want to obtain information on the number of parameters in a neural network, we can do that very simply with the function `parameterlength`. For the `LASympNet`:
```@example sympnet
parameterlength(la_nn.model)
```

And for the `GSympNet`:
```@example sympnet
parameterlength(g_nn.model)
```

*Remark*: We can also specify whether we would like to start with a layer that changes the $q$-component or one that changes the $p$-component. This can be done via the keywords `init_upper` for `GSympNet`, and `init_upper_linear` and `init_upper_act` for `LASympNet`.

We have to define an optimizer which will be use in the training of the SympNet. For more details on optimizer, please see the [corresponding documentation](../Optimizer.md). In this example we use [Adam](../optimizers/adam_optimizer.md):
Expand Down

0 comments on commit 858d440

Please sign in to comment.