A tensor is just an n-dimensional array. That's it.
- A single number is a 0D tensor (scalar)
- A list of numbers is a 1D tensor (vector)
- A table of numbers is a 2D tensor (matrix)
- A cube of numbers is a 3D tensor
- Images are 4D tensors (batch x channels x height x width)
If you've used NumPy arrays, you already know 80% of this. PyTorch tensors are NumPy arrays that can run on GPUs and track gradients.