GithubHelp home page GithubHelp logo

ximmao / ode2vae Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cagatayyildiz/ode2vae

0.0 0.0 0.0 78.33 MB

ODE2VAE: Deep generative second order ODEs with Bayesian neural networks

Python 97.93% Shell 2.07%

ode2vae's Introduction

TensorFlow and PyTorch implementation of Deep generative second order ODEs with Bayesian neural networks by
Çağatay Yıldız, Markus Heinonen and Harri Lahdesmäki.

model architecture

We tackle the problem of learning low-rank latent representations of possibly high-dimensional sequential data trajectories. Our model extends Variational Auto-Encoders (VAEs) for sequential data with a latent space governed by a continuous-time probabilistic ordinary differential equation (ODE). We propose

  1. a powerful second order ODE that allows modelling the latent dynamic ODE state decomposed as position and momentum
  2. a deep Bayesian neural network to infer latent dynamics.

Video

Here is our video summarizing the paper:

ODE2VAE video

Minimal PyTorch Implementation

In addition to the TensorFlow implementation decribed below, we provide a minimal, easy-to-follow PyTorch implementation for clarity. Check torch_ode2vae_minimal.py for more details. The dataset needed to run the script is here. Make sure to update the path or put both files into the same folder.

Replicating the Experiments

The code is developed and tested on python3.7 and TensorFlow 1.13. hickle library is also needed to load the datasets. Full list of dependencies:

python==3.7
tensorflow==1.13
matplotlib
scipy
hickle==3.4
tensorflow_probability
torch, torchdiffeq # for torch code

Training and test scripts are placed in the scripts directory. In order to run reproduce an experiment, run the following command from the project root folder:

./scripts/train_bballs.sh

Once the optimization is completed, you can see the performance on test set by running

./scripts/test_bballs.sh

All Datasets

The datasets can be downloaded from here (1.9 GB). The folders contain

  1. preprocessed walking sequences from CMU mocap library
  2. rotating mnist dataset generated using this implementation
  3. bouncing ball dataset generated using the code provided with the original paper.

Do not forget to update the dataset paths in bash scripts with the local path to the downloaded folder.

Figures from Trained Models

This folder (20 MB) contains TensorFlow graphs of already optimized models. After downloading run

./scripts/test_bballs.sh

to reproduce the results. Similarly, the path argument in test bash files needs to be overriden by the downloaded checpoint folder path.

Example Walking Sequences

test + synthesized sequences test + synthesized sequences

Rotating Threes

Long Term Bouncing Balls Predictions

bouncing ball data + reconstructions

ode2vae's People

Contributors

cagatayyildiz avatar

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.