What is PyTorch

PyTorch is an open-source machine learning library developed by Facebook that supports multiple languages, such as Python and C++. PyTorch is among the most famous and widely used libraries for machine learning in the world. Many software tools and products are built on top of PyTorch, including Tesla Autopilot, Uber’s Pyro, and HuggingFace’s Transformers.

What is a PyTorch tensor

In short, a PyTorch tensor is an n-dimensional array that is the same as a NumPy array or TensorFlow tensor. You can consider a rank 0 tensor as a scalar, a rank 1 tensor as a vector, and a rank 2 tensor as a matrix. For higher-dimensional, they are rank n tensor. This difference between the ranks is shown in the figure below.

Difference of ranks of Tensors
Difference of ranks of Tensors

Course learning goal

Tensors form the fundamental building block of the PyTorch ecosystem. Various components, such as network layers, loss functions, gradient descent, and optimizers rely on underlying tensor operations.

This course aims to familiarize the learner with tensors, as used in PyTorch, through hands-on exercises.

Prerequisites required

To get the most out of the course, you’ll need a basic knowledge of Python programming. You do not need prior experience with PyTorch or other machine learning libraries.