How To Install lua-torch-nn on Debian 10

Learn how to install lua-torch-nn on Debian 10 with this tutorial. lua-torch-nn is Neural Network Package for Torch Framework

Introduction

In this tutorial we learn how to install lua-torch-nn on Debian 10.

What is lua-torch-nn

lua-torch-nn is:

This package provides an easy and modular way to build and train simple or complex neural networks using Torch Framework:

  • Modules are the bricks used to build neural networks. Each are themselves neural networks, but can be combined with other networks using containers to create complex neural networks:

    • Module: abstract class inherited by all modules.
    • Containers: container classes.
    • Transfer functions: non-linear functions.
    • Simple layers: simple network layer like Linear.
    • Table layers: layers for manipulating tables.
    • Convolution layers: several kinds of convolutions.
  • Criterions compute a gradient according to a given loss function given an input and a target:

    • Criterions: a list of all criterions.
    • MSECriterion: the Mean Squared Error criterion used for regression;
    • ClassNLLCriterion: the Negative Log Likelihood criterion used for classification.
  • Additional documentation:

  • Overview of the package essentials including modules, containers and training.
  • Training: how to train a neural network using optim.
  • Testing: how to test your modules.
  • Experimental Modules: a package containing experimental modules and criteria.

This package is a core part of the Torch Framework.

There are three methods to install lua-torch-nn on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install lua-torch-nn Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install lua-torch-nn using apt-get by running the following command:

sudo apt-get -y install lua-torch-nn

Install lua-torch-nn Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install lua-torch-nn using apt by running the following command:

sudo apt -y install lua-torch-nn

Install lua-torch-nn Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install lua-torch-nn using aptitude by running the following command:

sudo aptitude -y install lua-torch-nn

How To Uninstall lua-torch-nn on Debian 10

To uninstall only the lua-torch-nn package we can use the following command:

sudo apt-get remove lua-torch-nn

Uninstall lua-torch-nn And Its Dependencies

To uninstall lua-torch-nn and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove lua-torch-nn

Remove lua-torch-nn Configurations and Data

To remove lua-torch-nn configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge lua-torch-nn

Remove lua-torch-nn configuration, data, and all of its dependencies

We can use the following command to remove lua-torch-nn configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge lua-torch-nn

Dependencies

lua-torch-nn have the following dependencies:

References

Summary

In this tutorial we learn how to install lua-torch-nn package on Debian 10 using different package management tools: apt, apt-get and aptitude.