Learning Stochastic Hamiltonian Systems via Stochastic Generating Function Neural Network