GithubHelp home page GithubHelp logo

wwxfromtju / versa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gordonjo/versa

0.0 0.0 0.0 39 KB

Code to reproduce experiments in "Meta-learning probabilistic inference for prediction"

License: MIT License

Python 100.00%

versa's Introduction

Meta-Learning Probabilistic Inference For Prediction

This repository implements the models and algorithms necessary to reproduce the experiments carried out in the paper Meta-Learning Probabilistic Inference For Prediction, Gordon and Bronskill et al. It includes code for running few-shot classification experiments with Omniglot and miniImageNet, as well as for reproducing the ShapeNet view reconstruction experiments.

The code has been authored by: John Bronskill, Jonathan Gordon, and Matthias Bauer.

The main components of the repository are:

  • run_classifier.py: script to run classification experiments on Omniglot and miniImageNet
  • train_view_reconstruction.py: script to train view recovery models using ShapeNet objects
  • evaluate_view_reconstruction.py: script to test view recovery models using ShapeNet objects
  • features.py: deep neural networks for feature extraction and image generation
  • inference.py: amortized inference networks for various versions of Versa
  • utilities.py: assorted functions to support the repository

Dependencies

This code requires the following:

  • python 2 or python 3
  • TensorFlow v1.0+

Data

For Omniglot, miniImagenet, and ShapeNet data, see the usage instructions in data/save_omniglot_data.py, data/save_mini_imagenet_data.py, and data/save_shapenet_data.py, respectively.

Usage

  • To run few-shot classification, see the usage instructions at the top of run_classifier.py.
  • To run view reconstruction, see the usage instructions at the top of train_view_reconstruction.py and evaluate_view_reconstruction.py.

Contact

To ask questions or report issues, please open an issue on the issues tracker.

Extending the Model

There are a number of ways the repository can be extended:

  • Data: to use alternative datasets, a class must be implemented to handle the new dataset. The necessary methods for the class are: __init__, get_batch, get_image_height, get_image_width, and get_image_channels. For example signatures see omniglot.py, mini_imagenet.py or omniglot.py. Note that the code currently handles only image data. Finally, add the initialization of the class to the file data.py.
  • Feature extractors: to use alternative feature extractors, simply implement a desired feature extractor in features.py and change the function call in run_classifier.py. For the required signature of a feature extractor see the function extract_features in features.py.

Citation

If you use this code for your research, please cite our paper: :

@inproceedings{gordon2018metalearning,
  title={Meta-Learning Probabilistic Inference for Prediction},
  author={Jonathan Gordon and John Bronskill and Matthias Bauer and Sebastian Nowozin and Richard Turner},
  booktitle={International Conference on Learning Representations},
  year={2019},
  url={https://openreview.net/forum?id=HkxStoC5F7},
}

versa's People

Contributors

gordonjo avatar jfb54 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.