We apply Neural Network, specifically MLP to solve ODE, and compare this method with traditional numerical method.
git clone ssh://git@focs.ji.sjtu.edu.cn:2222/tang_jingfan/NeuralODE.gitconda create -n neural_ode python=3.8
conda activate neural_ode
pip install -r requirements.txtchmod +x drive
./drive --help # get help
./drive 2.0 0.5 0.2 # just run
./drive 2.0 0.5 0.2 --plot # plot
./drive 2.0 0.5 0.2 --plot --rate --stability # plot, compare the efficiency, show stabilityYou can see the results in dir outputs.
We choose 4 traditional methods
- Runge-Kutta 4
- Adaptive RK
- Adams-Bashforth
- Adams-Moulton
comparing to NN (Neural Network).
If --stability argument exists, then original data points and the perturbation data points will be stored in ./outputs/points. The data points file with _p suffix represent the perturbation version. Then the stability.py will read the date from these points, and show the stabilities.
You can see the plot, efficiecncy comparison and stability results in dir img.
- Sun Zhengjia
- Tang Jingfan
- Zuo Tianyou