Back

ⓘ Torch, machine learning. Torch is an open-source machine learning library, a scientific computing framework, and a script language based on the Lua programming ..




Torch (machine learning)
                                     

ⓘ Torch (machine learning)

Torch is an open-source machine learning library, a scientific computing framework, and a script language based on the Lua programming language. It provides a wide range of algorithms for deep learning, and uses the scripting language LuaJIT, and an underlying C implementation. As of 2018, Torch is no longer in active development. However, PyTorch is actively developed as of August 2019.

                                     

1. torch

The core package of Torch is torch. It provides a flexible N-dimensional array or Tensor, which supports basic routines for indexing, slicing, transposing, type-casting, resizing, sharing storage and cloning. This object is used by most other packages and thus forms the core object of the library. The Tensor also supports mathematical operations like max, min, sum, statistical distributions like uniform, normal and multinomial, and BLAS operations like dot product, matrix-vector multiplication, matrix-matrix multiplication, matrix-vector product and matrix product.

The following exemplifies using torch via its REPL interpreter:

The torch package also simplifies object oriented programming and serialization by providing various convenience functions which are used throughout its packages. The torch.classclassname, parentclass function can be used to create object factories classes. When the constructor is called, torch initializes and sets a Lua table with the user-defined metatable, which makes the table an object.

Objects created with the torch factory can also be serialized, as long as they do not contain references to objects that cannot be serialized, such as Lua coroutines, and Lua userdata. However, userdata can be serialized if it is wrapped by a table or metatable that provides read and write methods.

                                     

2. nn

The nn package is used for building neural networks. It is divided into modular objects that share a common Module interface. Modules have a forward and backward method that allow them to feedforward and backpropagate, respectively. Modules can be joined together using module composites, like Sequential, Parallel and Concat to create complex task-tailored graphs. Simpler modules like Linear, Tanh and Max make up the basic component modules. This modular interface provides first-order automatic gradient differentiation. What follows is an example use-case for building a multilayer perceptron using Modules:

Loss functions are implemented as sub-classes of Criterion, which has a similar interface to Module. It also has forward and backward methods for computing the loss and backpropagating gradients, respectively. Criteria are helpful to train neural network on classical tasks. Common criteria are the Mean Squared Error criterion implemented in MSECriterion and the cross-entropy criterion implemented in ClassNLLCriterion. 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.

                                     

3. Other packages

Many packages other than the above official packages are used with Torch. These are listed in the torch cheatsheet. These extra packages provide a wide range of utilities such as parallelism, asynchronous input/output, image processing, and so on. They can be installed with LuaRocks, the Lua package manager which is also included with the Torch distribution.

                                     

4. Applications

Torch is used by the Facebook AI Research Group, IBM, Yandex and the Idiap Research Institute. Torch has been extended for use on Android and iOS. It has been used to build hardware implementations for data flows like those found in neural networks.

Facebook has released a set of extension modules as open source software.

                                     
  • Machine learning ML is the scientific study of algorithms and statistical models that computer systems use to perform a specific task without using explicit
  • developed by Torch Media Torch machine learning a library of machine learning algorithms TORCH search a Tor hidden search engine BlackBerry Torch a smartphone
  • Singa Caffe Py Torch mlpack TensorFlow Torch CNTK Accord.Net Machine learning library Deeplearning4j Theano Scikit - learn Keras Machine learning algorithm
  • Py Torch is an open source machine learning library based on the Torch library, used for applications such as computer vision and natural language processing
  • Machine Learning PDF GitHub - jonathantompson jtorch: An OpenCL Torch Utility Library GitHub. Cheatsheet GitHub. cltorch GitHub. Torch CUDA
  • of machine learning Major discoveries, achievements, milestones and other major events are included. History of artificial intelligence Machine learning
  • Human Torch also known as Jim Hammond originally, Hamond is a fictional superhero appearing in American comic books published by Marvel Comics. Created
  • race with CaffeOnSpark Caffe2 Open Source Brings Cross Platform Machine Learning Tools to Developers Caffe2 Merges With Py Torch Official website
  • purposes Torch machine learning a deep learning software library written in Lua programming language Weka machine learning a suite of machine learning
  • source machine learning Python projects. In December 2019, Preferred Networks announced the transition of its development effort from Chainer to Py Torch and

Users also searched:

deep learning frameworks, deep learning libraries, deep learning with pytorch pdf, import torch, torch windows,

...
...
...