How To Install lua-torch-optim on Ubuntu 18.04
Introduction
In this tutorial we learn how to install lua-torch-optim
on Ubuntu 18.04.
What is lua-torch-optim
lua-torch-optim is:
This package contains several optimization routines and a logger for Torch.
The following algorithms are provided:
- Stochastic Gradient Descent
- Averaged Stochastic Gradient Descent
- L-BFGS
- Congugate Gradients
- AdaDelta
- AdaGrad
- Adam
- AdaMax
- FISTA with backtracking line search
- Nesterov’s Accelerated Gradient method
- RMSprop
- Rprop
- CMAES All these algorithms are designed to support batch optimization as well as stochastic optimization. It’s up to the user to construct an objective function that represents the batch, mini-batch, or single sample on which to evaluate the objective.
This package provides also logging and live plotting capabilities via the
optim.Logger()
function. Live logging is essential to monitor the
network accuracy and cost function during training and testing, for
spotting under- and over-fitting, for early stopping or just for monitoring
the health of the current optimisation task.
There are three methods to install lua-torch-optim
on Ubuntu 18.04. 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-optim 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-optim
using apt-get
by running the following command:
sudo apt-get -y install lua-torch-optim
Install lua-torch-optim Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install lua-torch-optim
using apt
by running the following command:
sudo apt -y install lua-torch-optim
Install lua-torch-optim 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 Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install lua-torch-optim
using aptitude
by running the following command:
sudo aptitude -y install lua-torch-optim
How To Uninstall lua-torch-optim on Ubuntu 18.04
To uninstall only the lua-torch-optim
package we can use the following command:
sudo apt-get remove lua-torch-optim
Uninstall lua-torch-optim And Its Dependencies
To uninstall lua-torch-optim
and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:
sudo apt-get -y autoremove lua-torch-optim
Remove lua-torch-optim Configurations and Data
To remove lua-torch-optim
configuration and data from Ubuntu 18.04 we can use the following command:
sudo apt-get -y purge lua-torch-optim
Remove lua-torch-optim configuration, data, and all of its dependencies
We can use the following command to remove lua-torch-optim
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge lua-torch-optim
References
Summary
In this tutorial we learn how to install lua-torch-optim
package on Ubuntu 18.04 using different package management tools: apt
, apt-get
and aptitude
.