Torch

From Alliance Doc
Revision as of 00:30, 4 April 2018 by FuzzyBot (talk | contribs) (Updating to match new version of source page)
Jump to navigation Jump to search
Other languages:

"Torch is a scientific computing framework with wide support for machine learning algorithms that puts GPUs first. It is easy to use and efficient, thanks to an easy and fast scripting language, LuaJIT, and an underlying C/CUDA implementation."

Torch has a distant relationship to PyTorch.[1] PyTorch provides a Python interface to software with similar functionality, but PyTorch is not dependent on Torch. See PyTorch for instructions on using it.

Torch depends on CUDA. In order to use Torch you must first load a CUDA module, like so:

Question.png
[name@server ~]$ module load cuda torch

Installing Lua packages

Torch comes with the Lua package manager, named luarocks. By design, luarocks will allow you to install new packages, but will not find the system packages. To install packages in your own folder, use the following:

Question.png
[name@server ~]$ luarocks install --local --deps-mode=all <package name>

By experience, we often find packages that do not install well with luarocks. If you have a package that is not installed in the default module and need help installing it, please contact our Technical support.