Coder Social home page Coder Social logo

irbm's Introduction

iRBM

Infinite Restricted Boltzmann Machine

Paper on arxiv and at ICML2015 - Deep Learning Workshop.

Dependencies:

  • python == 2.7
  • numpy >= 1.7
  • scipy >= 0.11
  • theano >= 0.6
  • texttable

Usage

Experiments are saved in : ./experiments/{experiment_name}/.

Datasets will be downloaded and saved in : ./datasets/{dataset_name}/.

Train

See python train_model.py --help

Binarized MNIST

Training a model (infinite RBM) on binarized MNIST.

python train_model.py --name "best_irbm_mnist" --max-epoch 100 --batch-size 64 --ADAGRAD 0.03 irbm binarized_mnist --beta 1.01 --PCD --cdk 10

CalTech101 Silhouettes

Training a model (infinite RBM) on CalTech101 Shilhouettes.

python train_model.py --name "best_irbm_caltech101" --max-epoch 1000 --batch-size 64 --ADAGRAD 0.03 irbm caltech_silhouettes28 --beta 1.01 --PCD --cdk 10

Evaluate

See python eval_model.py --help

Binarized MNIST

Evaluating a model trained on binarized MNIST (assuming the one above).

python eval_model.py experiments/best_irbm_mnist/

CalTech101 Silhouettes

Evaluating a model trained on CalTech101 Silhouettes (assuming the one above).

python eval_model.py experiments/best_irbm_caltech101/

Sample

See python sample_model.py --help

Binarized MNIST

Generating 16 binarized MNIST digits images sampled from a trained model (assuming the one above).

python -u sample_model.py experiments/best_irbm_mnist/ --nb-samples 16 --view

CalTech101 Silhouettes

Generating 16 silhouette images sampled from a trained model (assuming the one above).

python -u sample_model.py experiments/best_irbm_caltech101/ --nb-samples 16 --view

Visualize filters

See python show_filters.py --help

Binarized MNIST

Visualizing filters of a model trained on binarized MNIST (assuming the one above).

python show_filters.py experiments/best_irbm_mnist/

CalTech101 Silhouettes

Visualizing filters of a model trained on CalTech101 Silhouettes (assuming the one above).

python show_filters.py experiments/best_irbm_caltech101/

Datasets

The datasets are automatically downloaded and processed. Available datasets are:

  • binarized MNIST
  • CalTech101 Silhouettes (28x28 pixels)

Troubleshooting

  • I got a weird cannot convert int to float error. TypeError: Cannot convert Type TensorType(float32, matrix) (of Variable Subtensor{int64:int64:}.0) into Type TensorType(float64, matrix)

Have you configured theano? Here is my .theanorc config (use cpu if you do not have a CUDA capable gpu):

[global]
device = gpu
floatX = float32
exception_verbosity=high

[nvcc]
fastmath = True
  • I got an IO error about status.json. IOError: [Errno 2] No such file or directory: './experiments/.../status.json'

There is no status.json file, so it is impossible to resume the experiment. Use --force to restart the experiment form scratch.

irbm's People

Contributors

marccote avatar vikkamath 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

irbm's Issues

question about evaluating

i evaluating a model trained on binarized MNIST,enter python eval_model.py experiments/best_irbm_mnist/
Then these appear

Loading dataset... (data: 50,000; 10,000; 10,000) 0.49 sec.
Loading model... (irbm with 852 hidden units) 0.40 sec.
Estimating model's partition function with AIS(5000) and 100,000 temperatures.... AIS run: 0/5000 (using batch size of 5000)

After that,There is no movement.always like this.

question about the process to use your project

Thank you for your listen! I don't know how to run you project correctly. Can you give me some instructions
about how to run the project correctly. For example, when I try to run train_model.py, an error comes at with the warning that
usage: train_model.py [-h] (--nb-epochs N | --max-epoch N) [--batch-size M]
[--dataset-percent X]
(--ConstantLearningRate LR | --ADAGRAD LR [EPS=1e-6])
[--L1Regularization LAMBDA | --L2Regularization LAMBDA]
[--name NAME] [--seed SEED] [--keep K] [-f]
...
train_model.py: error: too few arguments
Can you give some instructions. Thank you very much.

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.