by esperent · 4y ago · 0 comments
If you're not familiar with tensors, where a matrix is a two-dimensional array of numbers, a tensor is an n-dimensional array.
Why this idea is not radical: ever hear of Tensorflow (one of the most popular AI libraries)? Or Google Tensor, which is a TPU (tensor processing unit)? Or Nvidia Tensor cores?
Computer scientists are already well aware of tensors and make extensive use of them, when it makes sense to do so.
Ok, you could use a flat array and index into it depending on the dimensions of the tensor (as is often done for matrices), but that's really just a way of saving ram or cpu cycles rather than a different representation.
float* x = malloc(width*height*channels*sizeof(float))
Is x an "Image"? Is x a "tensor"? Is x a "raster"?
For tensors specifically, if x is not itself the product of vector spaces, then it's not a tensor.
tl;dr: While every rank-N tensor can be represented with multidimensional arrays, not all multidimensional arrays are rank-N tensors.
I don't know much about tensors used in AI or in physics. But I do know quite a bit about mathematical constructs being used across different domains and very often the definition is subtly different, so you cannot make a statement about the definition of tensors in physics and assume it'll hold for tensors in AI.