PyTorch

Introduction

PyTorch is a powerful machine learning library for Python.  It comes in CPU and GPU enabled versions.  Currently RCC only has support for the CPU version using the anaconda3.7.3 module though users are welcome to install the GPU version from within their own home directories using a conda environment or a virtualenv environment.  See venv for more information on virtual environments and conda environments for more information on conda environments.

Using PyTorch on HPC Systems

In order to use PyTorch on HPC, you need to first load the appropriate anaconda module.  Then, from within Python, load PyTorch.  This can be done as follows.  Starting from the terminal when you log in to HPC, type:

module load anaconda3.7.3

Then, to use PyTorch in your Python code, be sure to include the following line near the top of your Python code:

import torch

From there, refer to the official tutorials or the official documentation for more information on how to make use of PyTorch in your software.

Version
1.3.1
Software Category