A simple container for all our Lua rocks.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
camera @ 6a6e482
csv @ 6ecb665
debugger @ 1aac632
demos @ c4e4e66
fex @ f1d6f7d
ffmpeg @ e691b9a
gm @ 8a4a696
image @ ee00dfc
imgraph @ 098475a
inline @ b900699
json @ 0759de7
kex @ a5b3618
liuflow @ 0c5d106
lushmat @ a66ec41
mattorch @ 5e41689
neuflow @ 44f881b
nng @ a453ee6
nnx @ 505f61f
opencv @ 39201ef
opengm @ 9d3bf0d
optim @ 80a1cfe
parallel @ b3d829e
sys @ 3e9e7da
torch @ 80c5060
unsup @ 42c6fe7
videograph @ a9a0133
vowpal_wabbit @ f851b98
webterm @ 2835fbf
xlua @ 69a0ed0


This repo is a container for all my Torch7 packages.

Note: all these packages used to be distributed into a big messy repo called XLearn.

Retrieve all packages

This repo is empty, and only contains references to other GIT repos. You can retrieve all of them like this:

$ git submodule init
$ git submodule update


1/ Torch7 and dependencies:

On Linux (Ubuntu > 9.04):

$ apt-get install gcc g++ git libreadline5-dev cmake wget libqt4-core libqt4-gui libqt4-dev

On Mac OS (Leopard, or more), using Homebrew:

$ brew install git readline cmake wget qt

Then on both platforms:

$ git clone https://github.com/andresy/torch
$ cd torch
$ mkdir build; cd build
$ cmake ..
$ make
$ [sudo] make install

2/ Packages:

Once Torch7 is installed, it comes with a package manager that you can use to either install packages from the web:

$ torch-pkg install pkg-name
$ torch-pkg --help

or build them locally, if you are planning to work on the sources:

$ cd pkg-name
$ torch-pkg deploy

Use Torch7

First run torch, and load a package:

$ torch
> require 'imgraph'

Once loaded, tab-completion will help you navigate through the library (note: tab-completion will only work if you have Qt4 and readline):

> imgraph. + TAB
imgraph.colorize(           imgraph.connectcomponents(  
imgraph.graph(              imgraph.histpooling(        
imgraph.segmentmst(         imgraph.testme(             
imgraph.watershed(          imgraph.gradient(

Most packages then provide a testme() function to quickly see what it does:

> imgraph.testme()

Checkout the demos & tutorials

$ cd demos

this repo contains demos, and tutorials to get started. Looking at the code is the best way to get there!


If you would like to develop one of the submodules you should check out the master branch of that module:

$ cd nnx
$ git checkout master
$ git pull

This puts you at the head of development for that submodule, and in the proper branch to commit any changes you make to the git repository for that module. To check out all the submodules in developer mode we have added the script :

$ ./gitall.sh

a simple command to repeat a git command to all subdirectories




  • switch all submodules to the master branch ./gitall.sh checkout master
  • pull updates for all submodules ./gitall.sh pull
  • other useful ./gitall.sh status ./gitall.sh diff

WARNING: will blindly send command(s) to git in each directory