Code Monkey home page Code Monkey logo

een's Introduction

Prediction under Uncertainty with Error-Encoding Networks

Code to train the models described in the paper "Prediction under Uncertainty with Error-Encoding Networks", by Mikael Henaff, Junbo Zhao and Yann LeCun.

 

 

Diagram

 

 

Usage:

Data

We provide all the datasets in one big file which can be downloaded here. After downloading, you can extract it with:

tar -xvf een_data.tar.gz

You can also download the Poke dataset from the author's website here. If you use the Poke or TORCS dataset in a paper, please cite the original work [1][2].

Training

The first step is to train the model in deterministic mode. This can be done with the following script

python train_een_deterministic.py -datapath /path/to/your/data -task breakout -save_dir /where/to/save/

You can change the task option to any of the other tasks. Once this is trained, you can train the model in its conditional mode with the desired number of latent variables by running:

python train_een_latent.py -datapath /path/to/your/data -task breakout -n_latent 2 -save_dir /where/to/save/

This script automatically loads the deterministic model weights from the folder specified with the -save_dir option, so make sure it is the same as in the previous script.

To train on a new dataset, include a data loader file in the 'dataloaders' folder and add an entry to the file config.json specifying the image width, height, number of channels and so on. You will also need to specify the size of the hidden representation in the field 'phi_fc_size', which will ensure that the fully-connected part of the phi function is the right size.

Visualization

After training, you can run the script visualize.py which will generate frame predictions for different z vectors.

python visualize.py -save_dir /path/to/models/

This will create a new directory for each model in the folder with the same name as the model file with '.viz' appended to it. This will contain one subfolder per set of conditioning frames, each with several generations using different z vectors. These are also saved as MP4 movie files for easier viewing.

Examples of generated videos using the models in the trained_models folder can be found here.

een's People

Contributors

jakezhaojb avatar mbhenaff avatar mikaelhenaff avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

een's Issues

How to predict future frames conditioned on previous 4 frames?

Hi, in the paper it is said that the trained model can predict 1 or 4 future frames conditioned on previous 4 frames.
How is this achieved for predicting 1 or 4 frames? Like, what's the value of x, the input frame, and z, the latent, for predicting each frame?

any baseline model be released?

I trained the model, but it is too slow, and I wish to use the original baseline model to check whether the training step is right? Where can I download the model=baseline-3layer-loss=l2-ncond=1-npred=1-nf=64-lrt=0.0005.model?

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.