Simple understanding of Tensor
If you are exploring Machine Learning and Deep Learning, you will see “Tensor“ appear “everywhere“ in life.
What is Tensor?
A tensor is a away to represent data, it helps machines can understand complex data.
In traditional programing, a variable can store string, number, bool and array. But tensors do much more than that like videos, audio, times series, graph and more.
If you see a bottle, can you store a bottle in a tensor.
Basically inside tensors are matrices and matrix like a 2-dimensional array.
Types of Tensor
0D tensor - Scalar
1D tensor - Vector
2D tensor - Matrix
3D tensor
4D tensor
… complex and more

Tensor, CPU and GPU
Tensor can be stored on both CPU(Central Processing Unit) and GPU(Graphics Processing Unit).
Calculations in the computer will be processed on the CPU, however for large tensors, processing on CPU will reduce performance.
At this point we need the GPU to increase performance.
GPU (Graphics Processing Unit) is designed to process thousands to millions of parallel operations thanks to its multi-core architecture (can have thousands of small cores).
Tensor processing is typically prioritized on the GPU over the CPU.
Note
This article is written based on my initial understanding and may not be entirely accurate, as I am not an expert. I am still continuing to learn more about this topic.
Comments
Post a Comment