Tensor
A tensor is a mathematical object that generalizes the concepts of scalars, vectors, and matrices. Tensors can be thought of as multi-dimensional arrays of numerical values that can represent data in various dimensions.
Order (or Rank):
- The order of a tensor refers to the number of dimensions it has.
- A scalar (single number) is a 0th-order tensor.
- A vector (1D array) is a 1st-order tensor.
- A matrix (2D array) is a 2nd-order tensor.
- Higher-order tensors can have three or more dimensions.
Components:
- Components are the values in the multi-dimensional array.
- Number of components depends on the order and the size of each dimension.
In deep learning, tensors are used to represent data, such as images (3D tensors) or batches of data (4D tensors).