Torch is an open-source machine learning library, a scientific computing framework, and a scripting language based on Lua.
[3] It provides LuaJIT interfaces to deep learning algorithms implemented in C. It was created by the Idiap Research Institute at EPFL.
It provides a flexible N-dimensional array or Tensor, which supports basic routines for indexing, slicing, transposing, type-casting, resizing, sharing storage and cloning.
What follows is an example of a Lua function that can be iteratively called to train an mlp Module on input Tensor x, target Tensor y with a scalar learningRate: It also has StochasticGradient class for training a neural network using stochastic gradient descent, although the optim package provides much more options in this respect, like momentum and weight decay regularization.
[7] These extra packages provide a wide range of utilities such as parallelism, asynchronous input/output, image processing, and so on.
[13][better source needed] It has been used to build hardware implementations for data flows like those found in neural networks.