An introduction to one of the the most basic structures used in machine learning: a tensor.
🧵👇
Tensors are the data structure used by machine learning systems, and getting to know them is an essential skill you should build early on.
A tensor is a container for numerical data. It is the way we store the information that we'll use within our system.
(2 / 16)
Three primary attributes define a tensor:
▫️ Its rank
▫️ Its shape
▫️ Its data type
(3 / 16)
The rank of a tensor refers to the tensor's number of axes.
Examples:
▫️ The rank of a matrix is 2 because it has two axes.
▫️ The rank of a vector is 1 because it has a single axis.
(4 / 16)
The shape of a tensor describes the number of dimensions along each axis.
Example:
▫️ A square matrix may have (3, 3) dimensions.
▫️ A tensor of rank 3 may have (2, 5, 7) dimensions.
(5 / 16)