Definition
In computer science and deep learning, a tensor is a mathematical object that generalizes scalars, vectors, and matrices to higher dimensions. It is characterized by its rank (number of dimensions) and shape (size along each dimension). Tensors allow efficient computation of linear algebra operations on GPUs and TPUs, forming the backbone of neural network data flow and parameter storage in frameworks like PyTorch and TensorFlow.
Summary
A multi-dimensional array that serves as the fundamental data structure for deep learning frameworks.
Key Concepts
- Rank
- Shape
- Dimensionality
- Broadcasting
Use Cases
- Image processing (4D tensors)
- Neural network weights storage
- Batched data input
Code Example
| |