Documentation of Learning_Hamiltonians¶
Learning Hamiltonians is a Python code for learning the Hamiltonian of a constrained mechanical system. It is part of the source code for the paper (Celledoni, Leone, Murari and Owren, 2022) and uses PyTorch as deep learning library, in particular the modules related to automatic differentiation, optimization algorithms and neural networks. An introduction to the problem and a description of the system under consideration are provided in Example. The learning procedure is presented in the homonymous section. The code can be run from the main file.