Learn practical skills, build real-world projects, and advance your career

Tensor Functions You May Not Know About

In this notebook, we cover PyTorch which is a more recent addition to the ecosystem of the deep learning framework. PyTorch can be seen as a Python front end to the Torch engine (which initially only had Lua bindings) which at its heart provides the ability to define mathematical functions and compute their gradients. PyTorch has fairly good Graphical Processing Unit (GPU) support and is a fast-maturing framework.

This notebook covers 5 such tensor functions from the Torch library

  • torch.linspace
  • torch.where
  • torch.flatten
  • torch.roll
  • torch.split
import torch

Function 1 - Torch.linspace