A multi-dimensional array.
Used in Deep Learning frameworks like PyTorch.
- Tensors are able to run on GPUs to accelerate computation.
Examples:
Rank 0: Scalar
1Rank 1: Vector
[1, 2, 3]Rank 2: Matrix
[[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]Rank 3+: Tensor
[[[ 1, 2, 3],
[ 4, 5, 6],
[ 7, 8, 9]],
[[10, 11, 12],
[13, 14, 15],
[16, 17, 18]]]