Coder Social home page Coder Social logo

fibarrola / eval_gen Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tonywu95/eval_gen

0.0 0.0 0.0 60.6 MB

Evaluation code with models for the paper "On the Quantitative Analysis of Decoder-Based Generative Models"

License: MIT License

Python 100.00%

eval_gen's Introduction

#On the Quantitative Analysis of Decoder-Based Models

Dependencies: Theano, Lasagne

##Evaluate the models:

To evaluate a decoder-based generative model:

  1. You need to provide your decoder gen in the form of a python function, which takes in a theano tensor variable Z (latent) and outputs a theano tensor variable X (the sample) (an example can be found in line 84-85 in ./lib/utils.py),
     def gen(Z):
       ... 
       return X

and modify the model loading procedure in load_model function at ./lib/utils.py.

  1. Modify the data loading procedure at ./lib/utils.py (e.g. load_mnist), including validation/training split. Or for loading another dataset.

  2. If you're evaluating your model on a dataset other than MNIST, you need to modify the data dimension in ./sampling/sampler.py, at line 19 and 20, and modify the procedure of calculating data likelihood at line 113 and 117. An example can be found at ./sampling/svhn_sampler.py

  3. Various command instruction can be found at comment after the command.

  4. Run function main(*args) in ./experiment/run.py

##Visualize posterior samples:

  1. mkdir ./vis
  2. Run function main(*args) in ./experiment/run.py, with plot_posterior set to 1.
  3. For visualizing the posterior samples of a particular digit X, set exps to "postXtra" for digit in training set and "postXval" for digit in validation set.

See an tensorflow implementation: https://github.com/jiamings/ais

eval_gen's People

Contributors

tonywu95 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.