Coder Social home page Coder Social logo

huji-deep / generative-convacs Goto Github PK

View Code? Open in Web Editor NEW
25.0 9.0 9.0 84 KB

Experiments from the article "Tensorial Mixture Models"

License: MIT License

Python 100.00%
neural-network deep-learning generative-model research tensor tensor-decomposition article experiments caffe missing-data

generative-convacs's Introduction

Tensorial Mixture Models

This repository contains the scripts used to reproduce the experiments from the article Tensorial Mixture Models. At the moment some of the experiments are missing, but we will add them in the coming weeks. If you are using this code in your article, or want to reference our results, please cite our article:

@article{sharir2016GenCAC,
  Author = {Sharir, Or and Tamari, Ronen and Cohen, Nadav and Shashua, Amnon},
  Journal = {arXiv preprint arXiv:1610.04167},
  Title = {Tensorial Mixture Models},
  Year = {2016}
}

Disclaimer

Even though this code had been thoroughly tested on our systems, it might not perform exactly the same on other systems. Additionally, though we have made every effort to provide a robust code (e.g., using fixed seeds), which should reproduce the exact same numbers as presented in the article, even slight variations in the computing environment could lead to meaningful differences in the computed results. If the generated results are not sufficient, we recommend another pass of cross-validation to fine-tune the parameters to your exact setting. You will find the use of our hyper_train.py script very useful for this task.

Installation

First, note that this repo uses submodules, and some of them contain their own submodules. To simplify installation, please clone the repository with the --recursive flag:

git clone --recursive https://github.com/HUJI-Deep/Generative-ConvACs.git

After you have clones the repository, be sure to install the python modules listed in requirements.txt:

pip install -r requirements.txt

Finally, please review the installation instructions of each of the submodule's repositories under the deps directory. If you just wish to run the Generative ConvACs models, then it's enough to follow the installation instructions of deps/simnets, our Caffe fork for the SimNets Architecture.

Experiments

Our experiments on MNIST are under exp/mnist, which contain separate directories for each model. Each model directory contains three sub-directories: train, test_iid and test_rects. The train directory contains all the scripts to train the given model on the dataset. The test_iid and test_rects use the previously trained model to test it on either the iid or missing rectangles missingness distributions. Use the run.py script present in each subdirectory to either train the model or test it. After all the tests are done, you can use the summary.py script to pretty print all the results. Please do not move the scripts, as they all assume they are stored in their original location relative to the root of the repository. Additionally, notice that some experiments support multiple GPUs, and might require user-input to use all of them appropriately (e.g., see the train_plan.json files under the train directories of cp_model and ht_model).

Please be advised that both training and testing might take a while to complete. If you wish to skip training the models yourself and just want to run the test, you can use one of the pre-trained models we have prepared for you. Simply place the extracted files in their respective train directory.

generative-convacs's People

Contributors

orsharir avatar ronentk 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

generative-convacs's Issues

ght_model, train plan not valid

Hello,

After I compiled caffe,

I tried to run "run.py" in/TMM/exp/mnist/ghp_model/train

I got this:

**All required datasets are present.
Generating pre-trained model:

All required datasets are present.
Invalid train plan!

Try python hyper_train.py --help for more information
Error calling hyper_train script
=============== DONE ===============
Invalid train plan!

Try python hyper_train.py --help for more information
Error calling hyper_train script**

I looked up "hyper_train.py" but I am not sure how to fix this error.

Cannot do 'make all'

Hello,
I already installed Caffe in my computer but I am getting an error.
When I do 'make all' in ~/TMM/deps/siments I got this:

PROTOC src/caffe/proto/caffe.proto
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/layers/absval_layer.cpp
In file included from ./include/caffe/layer.hpp:12:0,
from ./include/caffe/layers/absval_layer.hpp:7,
from src/caffe/layers/absval_layer.cpp:3:
./include/caffe/util/math_functions.hpp:140:1: error: ‘forceinline’ does not name a type
forceinline device host int8_t caffe_sign(Dtype val) {
^
./include/caffe/util/math_functions.hpp: In function ‘void caffe::caffe_cpu_sign(int, const Dtype*, Dtype*)’:
./include/caffe/util/math_functions.hpp:160:42: error: ‘caffe_sign’ was not declared in this scope
DEFINE_CAFFE_CPU_UNARY_FUNC(sign, y[i] = caffe_sign(x[i]));
^
./include/caffe/util/math_functions.hpp:155:7: note: in definition of macro ‘DEFINE_CAFFE_CPU_UNARY_FUNC’
operation;
^
./include/caffe/util/math_functions.hpp:160:58: error: expected primary-expression before ‘>’ token
DEFINE_CAFFE_CPU_UNARY_FUNC(sign, y[i] = caffe_sign(x[i]));
^
./include/caffe/util/math_functions.hpp:155:7: note: in definition of macro ‘DEFINE_CAFFE_CPU_UNARY_FUNC’
operation;
^
Makefile:572: recipe for target '.build_release/src/caffe/layers/absval_layer.o' failed
make: *** [.build_release/src/caffe/layers/absval_layer.o] Error 1

My OS is ubuntu 16.04.

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.