From Grundy
Jump to: navigation, search

Torch is a scientific computing framework with wide support for machine learning algorithms that puts GPUs first. It has been around since 2000, with 4 versions(all odd numbers) released. Ronan Collobert (Research Scientist@Facebook) has been the main developer of all versions. It has always aimed for large-scale learning applications viz. speech, image and video processing and large-scale machine learning applications.

Quoting google: ”The goal of Torch is to have maximum flexibility and speed in building your scientific algorithms while making the process extremely simple. Torch comes with a large ecosystem of community-driven packages in machine learning, computer vision, signal processing, parallel processing, image, video, audio and networking among others, and builds on top of the Lua community.”

What are the Pre-requisites?

  • Lua - At the heart of Torch is a not so python-like programming language Lua and its JIT compiler LuaJIT. Lua is a lightweight multi-paradigm scripting language. Lua is an extremely fast scripting language built upon C, much faster than Python. It is a very simple and readable language like python and it is embeddable into any environment(iPhone apps, Video games, web backends). One can get a crisp and short tutorial on Lua at Learn Lua in 15 mins. Also, to know it’s limitations, here - Limitations . For a more comprehensive tutorial one can refer to TutorialsPoint Lua or Programming in Lua.
  • Machine Learning - Not essential, but knowing basic Machine Learning will help you rise up the steep learning curve very quickly. Have a look at our Machine Learning guide for more.

Installing Torch

A fairly straightforward installation procedure is given here - Installating Torch.

Learning Torch

Here is a list of tutorials you must understand:

  • Basic Deep Learning Tutorial - A 60-minute Blitz tutorial on torch. This is the perfect tutorial to get started with.
  • Basics of torch - Another basic tutorial like the one above in a rather more lucid language, with more English and less code.
  • Basic MNIST - Basic MNIST tutorial with Torch. If you understand this after reading either of the above two tutorials you are good to go ahead.
  • Video-Tutorials- For those who fancy video tutorials, this covers the basics (Lua, Torch's Tensor and image package) and introduces the concepts of neural networks, forward and backward propagation (both by-hand using Tensors and with the nn package). Part 1 and 2 are essential for basics but Part 3 and 4 are more involved and you may need prior knowledge on CNN's and RNN's to understand those.
  • [Slides] Univeristy of Toronto Slides - These will help clear some of the conceptual doubts you may be having and reading the code snippets given is a good exercise.

We strongly recommend trying out a small project of your own along with these tutorials to learn Torch well. Lastly, you can always refer to the docs and tutorials listed there.

See Also