Giter Site home page Giter Site logo

goku's Introduction

GOKU - Deep Generative ODE Modelling with Known Unknowns

This repository is an implementation of the GOKU paper: Generative ODE Modeling with Known Unknowns.

Data creation

To create the datasets used in the paper run:

  • Friction-less pendulum: python3 create_data.py --model pendulum
  • Friction pendulum: python3 create_data.py --model pendulum --friction
  • Double-pendulum experiment: python3 create_data.py --model double_pendulum
  • Cardiovascular system: python3 create_data.py --model cvs

The data would be created using default arguments. To view / modify them check the file config.py, and create_data.py.

Training

To train the GOKU model run: python3 goku_train.py --model <pendulum/pendulum_friction/double_pendulum/cvs>

To train baselines:

  • Latent-ODE: python3 latent_ode_train.py --model <pendulum/pendulum_friction/double_pendulum/cvs>.
  • LSTM: python3 lstm_train.py --model <pendulum/pendulum_friction/double_pendulum/cvs>.
  • Direct-Identification (DI) has 3 different files for the different datasets (it cannot run the friction pendulum, since it needs the entire ODE functional form):
    • Pendulum: python3 di_baseline_pendulum.py
    • Double Pendulum: python3 di_baseline_double_pendulum.py
    • CVS: python3 di_baseline_cvs.py

Requirements:

  • python 3
  • pytorch
  • numpy
  • gym (for the pendulum and double pendulum experiments)

goku's People

Contributors

orilinial avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

goku's Issues

Error generating pendulum data

gym version 0.11.0
scikit-image version 0.16.2

Is this error due to scikit image/gym or an error in the preproc() function code? Any pointers towards solving this would help and/or sharing the pendulum data with a drive link would help too! Thanks.

python3 create_data.py --model pendulum
  0%|                                                                     | 0/500 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "create_data.py", line 130, in <module>
    make_dataset(args)
  File "create_data.py", line 49, in make_dataset
    raw_data, latent_data, params_data = args.create_raw_data(args)
  File "/home/pranav/GIT_repos/GOKU/utils/create_pendulum_data.py", line 78, in create_pendulum_data
    processed_frame = preproc(env.render('rgb_array'), side)
  File "/home/pranav/GIT_repos/GOKU/utils/create_pendulum_data.py", line 19, in preproc
    return skimage.transform.resize(X, [int(side), side]) / 255.
  File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/skimage/transform/_warps.py", line 166, in resize
    preserve_range=preserve_range)
  File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/skimage/transform/_warps.py", line 807, in warp
    raise ValueError("Cannot warp empty image with dimensions", image.shape)
ValueError: ('Cannot warp empty image with dimensions', (0, 0))
Exception ignored in: <bound method Viewer.__del__ of <gym.envs.classic_control.rendering.Viewer object at 0x7fcf3301eda0>>
Traceback (most recent call last):
  File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/gym/envs/classic_control/rendering.py", line 143, in __del__
  File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/gym/envs/classic_control/rendering.py", line 62, in close
  File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/pyglet/window/xlib/__init__.py", line 480, in close
  File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/pyglet/gl/xlib.py", line 345, in destroy
  File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/pyglet/gl/base.py", line 334, in destroy
  File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/pyglet/gl/xlib.py", line 335, in detach
  File "/home/pranav/anaconda3/envs/my_lab/lib/python3.6/site-packages/pyglet/gl/lib.py", line 97, in errcheck
ImportError: sys.meta_path is None, Python is likely shutting down

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.