Cheatsheet (original) (raw)

A quick page for everything Torch.

Core Math Visualization Utility libraries
Data formats I/O Sensor I/O Databases
Machine Learning Computer Vision NLP
Parallel Processing CUDA OpenCL
Images Videos Audio
Asynchronous Networking Security
Alternative REPLs Interfaces to third-party libs Reinforcement Learning
Miscellaneous

Newbies

  1. Read this page end-to-end (especially the Gotchas)
  2. Install torch
  3. Go though chapter 1 of the video tutorials
  4. Look at the coding tutorial
  5. Play around with the interpreter
  6. Create your own script
  7. Create your own package
  8. Contribute! :)

If you are used to numpy, have a look at this pageIf you are used to Matlab, have a look at this translation pdf

Installing and Running Torch

Mac OS X and Ubuntu 12+

To make sure that the main install instructions for Mac OS X and Ubuntu 12+ are not replicated, and in a single place, we've put them here.

Gentoo Linux

Some external instructions here.

Windows

Running Torch on Windows

iOS

https://github.com/clementfarabet/torch-ios

Android

https://github.com/soumith/torch-android

EC2 Public AMI

EC2 AMI with the following pre-installed packages:

AMI Id: ami-b36981d8. (Can be launched using g2.2xlarge instance)
Launch an instance.

EC2 Bitfusion AMI

EC2 AMI pre-installed with CUDA, cuDNN, torch-distro (torch + common packages), iTorch, Jupyter, and more. Also includes Bitfusion Boost which lets you combine multiple instances into a single virtual instance for max-performance applications and analysis without any code changes required.

Launch an instance from the AWS Marketplace.

Docker Images

docker pull kaixhin/torch

CUDA 7.5 version - see repo for requirementsdocker pull kaixhin/cuda-torch

CUDA 7.0 version - see repo for requirementsdocker pull kaixhin/cuda-torch:7.0

CUDA 6.5 version - see repo for requirementsdocker pull kaixhin/cuda-torch:6.5

Ubuntu 14.04 + iTorch notebook - see docker hub repo for details and usage docker pull dhunter/itorch-notebook

Installing Packages

Given a package name, you can install it at your terminal with:

luarocks install [packagename]

Tutorials, Demos by Category

Tutorials

Demos

List of Packages by Category

General Math

Data formats

Machine Learning

Visualization

Mainly provided by three styles:

or

or

An excellent overview of all plotting packages in torch is given by Florian Strub in this blogpost:http://www.lighting-torch.com/2015/08/24/plotting-with-torch7/

Computer Vision

Images

Videos

Audio

Natural Language Processing

Sensor Input/Output

Distributed Computing / Parallel Processing

Alternative REPLs

Utility libraries

Utility toolboxes

Documentation

File System

Programming helpers

Printing / Logging / Debugging

Testing

Social

Uncategorized

Databases


Asynchronous paradigm - (like nodejs)

Networking

Security

CUDA

Using multiple GPUs parallely is supported. Look at this link for more info

OpenCL

Reinforcement Learning

Miscellaneous

Packages which I didn't know where to put

Creating your own package

You can quickly fork off of this example package:

Debuggers / Visual Debuggers / IDEs

Some advice from Florian STRUB:

Therefore, I strongly advise you to use Eclipse if you are willing to use advanced debugging features.http://www.eclipse.org/ldt/

In order to run Torch from Eclipse, Torch's LuaJIT should be added via Windows -> Preferences -> Lua -> Interpreters.

GPU Support

CUDA Support, CUDA examples

NVIDIA Jetson TK1

OpenCL support, OpenCL examples

CPU backends

Gotchas

LuaJIT limitations, gotchas and assumptions

Must read! - http://luapower.com/luajit-notes

2GB and addressing limit

Legacy