Torch7 is a scientific computing framework with wide support for machine learning algorithms. It is easy to use and provides a very efficient implementation, thanks to an easy and fast scripting language, LuaJIT, and an underlying C implementation.Among other things, it provides:
- a powerful N-dimensional array
- lots of routines for indexing, slicing, transposing, ...
- amazing interface to C, via LuaJIT
- linear algebra routines
- neural network, and energy-based models
- numeric optimization routines
If you have questions or need support, use our mailing list:
The easiest way to install Torch is to run these two commands:
$ curl -sk https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash $ curl -sk https://raw.githubusercontent.com/torch/ezinstall/master/install-luajit+torch | bash
The first script installs basic dependencies / libraries that LuaJIT and Torch require. The second script installs LuaJIT, Luarocks, and then uses Luarocks to install Torch and a few common/useful packages. These scripts work on Ubuntu >= 12.04 and OSX >= 10.8.
If you install Luajit and Luarocks yourself, you'll have to specify the URL to our rock server, to find Torch. We recommend you either use the script above to automate that process.
$ luarocks --version Luarocks 2.0.12 $ luajit -v LuaJIT 2.0.2 -- Copyright (C) 2005-2013 Mike Pall. http://luajit.org/ $ luarocks --server=https://raw.githubusercontent.com/torch/rocks/master install torch
Other packages can be installed the same way, using Luarocks:
$ luarocks --server=https://raw.githubusercontent.com/torch/rocks/master install image $ luarocks --server=https://raw.githubusercontent.com/torch/rocks/master list
Once installed you can run torch with the command "th" from you prompt!
Torch used to be distributed as a single repo, which provided a few default packages. These packages, along with their documentation, are now each hosted on their own Github repository. Here is the list of official Torch packages:
|torch||doc||numeric library, n-dim array, linear algebra routines ...|
|nn||doc||modular neural network framework|
|optim||doc||numeric optimization routines (SGD, L-BFGS, CG, ...)|
|gnuplot||doc||interface to gnuplot, for plots/graphics|
|cutorch||N/A||Torch for CUDA|
|cunn||N/A||nn for CUDA|
|paths||doc||paths, file system|
|image||N/A||image transform routines, color spaces, I/O, ...|
|trepl||doc||pure Lua REPL - installs a "th" binary with better completion, history, ...|
|cwrap||doc||automatic C wrapper for Lua|
|qtlua||doc||QT for Lua|
Even more packages can be found using Luarocks:
$ luarocks --server=https://raw.githubusercontent.com/torch/rocks/master search --all
See the list of rocks we're hosting here.
Torch7 is developed at Idiap Research Institute, New York University and NEC Laboratories America.
We also use the great Qt Lua interface from Leon Bottou: QtLua.
If you use Torch7 for your work, please cite the following paper: R. Collobert, K. Kavukcuoglu and C. Farabet. Torch7: A Matlab-like Environment for Machine Learning. In BigLearn, NIPS Workshop, 2011.
Torch7 is distributed under a BSD license. It runs on Linux, FreeBSD and MacOS X. Core packages also work on Windows.