How To Install python3-skorch on Kali Linux

In this tutorial we learn how to install python3-skorch on Kali Linux. python3-skorch is scikit-learn compatible neural network library that wraps PyTorch

Introduction

In this tutorial we learn how to install python3-skorch on Kali Linux.

What is python3-skorch

python3-skorch is:

The goal of skorch is to make it possible to use PyTorch with sklearn. This is achieved by providing a wrapper around PyTorch that has an sklearn interface. In that sense, skorch is the spiritual successor to nolearn, but instead of using Lasagne and Theano, it uses PyTorch.

skorch does not re-invent the wheel, instead getting as much out of your way as possible. If you are familiar with sklearn and PyTorch, you don??t have to learn any new concepts, and the syntax should be well known. (If you??re not familiar with those libraries, it is worth getting familiarized.)

Additionally, skorch abstracts away the training loop, making a lot of boilerplate code obsolete. A simple net.fit(X, y) is enough. Out of the box, skorch works with many types of data, be it PyTorch Tensors, NumPy arrays, Python dicts, and so on. However, if you have other data, extending skorch is easy to allow for that.

Overall, skorch aims at being as flexible as PyTorch while having a clean interface as sklearn.

There are three methods to install python3-skorch on Kali Linux. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install python3-skorch Using apt-get

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

sudo apt-get update

After updating apt database, We can install python3-skorch using apt-get by running the following command:

sudo apt-get -y install python3-skorch

Install python3-skorch Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install python3-skorch using apt by running the following command:

sudo apt -y install python3-skorch

Install python3-skorch Using aptitude

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

sudo aptitude update

After updating apt database, We can install python3-skorch using aptitude by running the following command:

sudo aptitude -y install python3-skorch

How To Uninstall python3-skorch on Kali Linux

To uninstall only the python3-skorch package we can use the following command:

sudo apt-get remove python3-skorch

Uninstall python3-skorch And Its Dependencies

To uninstall python3-skorch and its dependencies that are no longer needed by Kali Linux, we can use the command below:

sudo apt-get -y autoremove python3-skorch

Remove python3-skorch Configurations and Data

To remove python3-skorch configuration and data from Kali Linux we can use the following command:

sudo apt-get -y purge python3-skorch

Remove python3-skorch configuration, data, and all of its dependencies

We can use the following command to remove python3-skorch configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge python3-skorch

Dependencies

python3-skorch have the following dependencies:

References

Summary

In this tutorial we learn how to install python3-skorch package on Kali Linux using different package management tools: apt, apt-get and aptitude.