Tensors!

Tensors!

Table of contents

No heading

No headings in the article.

Simply put - “Tensors are containers for numbers.” Yes, it’s a fancy name of data structure. A tensor is a mathematical object that generalizes scalars, vectors, and matrices to higher dimensions.

It can be of 0 dimensional, 1 dimensional, 2 dimensional, 3 dimensional and many more.

  • Scalars or 0D Tensors: Single real number is called as 0D Tensor. Example - single real number.

  • 1D Tensor: List of numbers is called as 1D Tensor. Example - Any one input row of the data used in training Machine Learning model.

  • 2DTensor: Collection of 2D tensors or simply a matrix which is collection of 1D Tensor is called as 3D Tensor. Example - Comple set of input and output data used in training ML Model is 2D Tensor.

  • 3D Tensor: Similarly, collection of 2D Tensors is called as 3D Tensors or collection of matrices is a 3D Tensor. Example - In NLP the representation of whole corpus gives us a 3D Tensor.