Torch/en
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.
Note
For some attempts to explain the connection between PyTorch and Torch, refer to: * What is the relationship between PyTorch and Torch? * What are the differences between Torch and Pytorch? * Torch autograd vs PyTorch autograd
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:
Installing Lua packages¶
Torch comes with the Lua package manager, named luarocks. Run
luarocks list
to see a list of installed packages.
If you need some package which does not appear on the list, use the following to install it in your own folder:
If after this installation you are having trouble finding the packages at runtime, then add the following command right before running "lua your_program.lua":
Note
This recommendation for resolving runtime path issues is based on the LuaRocks Wiki.
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.