News for hackers. Stuff that matters.
Re:HPTT: A High-Performance Tensor Transposition C++ Library by kgwgk on Monday April 24, 2017 @07:54AM (#14183484)
For some reason, people use now the name "tensor" to refer to multidimensional arrays.
Re:HPTT: A High-Performance Tensor Transposition C++ Library by nabla9 on Monday April 24, 2017 @08:32AM (#14183731)
Probably for same reason as they use the name "vector" to refer one dimensional array, "matrix" to refer 2 dimensional array. Tensor is generalization of matrix to more than 2 indices.

In physics people use tensor as a shorthand for tensor field.

Re:HPTT: A High-Performance Tensor Transposition C++ Library by azag0 on Monday April 24, 2017 @08:37AM (#14183766)
A tensor is any quantity that transforms in a specific way under rotations. Essentially, it is required that a tensor describing some process gives the same answer no matter from which point (literally) one looks at it.

Tensor fields are spatial functions whose function value at each point is a tensor.

Re:HPTT: A High-Performance Tensor Transposition C++ Library by nabla9 on Monday April 24, 2017 @08:59AM (#14183925)
You might be familiar with more specific definition of tensors in physics where they come with full tensor calculus and transform in certain way.

More general mathematical definition of tensor is that tensors are multilinear maps from vector spaces to scalars. That's how TensorFlow and HPTT see these tensors.

Re:HPTT: A High-Performance Tensor Transposition C++ Library by tome on Monday April 24, 2017 @09:29AM (#14184113)
> More general mathematical definition of tensor is that tensors are multilinear maps from vector spaces to scalars. That's how TensorFlow and HPTT see these tensors.

Oof, you have to squint very hard to see things that way.

Just because an image is physically a two-dimensional array of pixels doesn't suddenly make it a rank-2 multilinear map, and just because you have N planes of images doesn't mean you suddenly have a rank-3 tensor!

Re:HPTT: A High-Performance Tensor Transposition C++ Library by radarsat1 on Monday April 24, 2017 @09:29AM (#14184115)
It seems to me that feature vectors in ML are used approximately like that, so I don't think it's so inappropriate. Take the preponderance of techniques like PCA, for example, features tend to be very often treated as rotation-invariant. Even if it's not 100% the case in the raw data, one very often wants to learn whatever features lie in subspaces that are invariant to linear transformations.
Re:HPTT: A High-Performance Tensor Transposition C++ Library by tome on Monday April 24, 2017 @09:30AM (#14184122)
> Probably for same reason as they use the name "vector" to refer one dimensional array, "matrix" to refer 2 dimensional array.

Yes, that's where the rot started.

Re:HPTT: A High-Performance Tensor Transposition C++ Library by dsharlet on Monday April 24, 2017 @01:20PM (#14186106)
That "rot" likely started centuries before anyone even imagined a computer for an "array" to exist on.
Re:HPTT: A High-Performance Tensor Transposition C++ Library by wohlergehen on Monday April 24, 2017 @08:16AM (#14183613)
In the case of physics, the name tensor is well deserved and used with purpose---the object are mathematically speaking tensors (and where called tensors before computers existed). Their naming is unrelated to their physical representation in memory, even though they end up being arrays. The same is true for various engineering disciplines.

For ML, it just turns out that they can talk about their objects and the corresponding operations also mathematically as tensors.

Re:HPTT: A High-Performance Tensor Transposition C++ Library by kgwgk on Monday April 24, 2017 @08:22AM (#14183659)
Except that none of these operations are related to the properties that make a tensor a tensor, as far as I know. People were already operating happily on multidimensional arrays before.
Re:HPTT: A High-Performance Tensor Transposition C++ Library by 21 on Monday April 24, 2017 @09:04AM (#14183949)
"multidimensional array" doesn't quite roll off the tongue
Re:HPTT: A High-Performance Tensor Transposition C++ Library by Eliezer on Monday April 24, 2017 @12:42PM (#14185743)
They could have just been called arrays.
Re:HPTT: A High-Performance Tensor Transposition C++ Library by azag0 on Monday April 24, 2017 @08:29AM (#14183703)
The reason probably is that tensors (in math/physics) can be represented as multi-indexed quantities, which are naturally expressed as multi-dimensional arrays in computers. 0-rank tensors are scalars, 1-rank tensors are vectors, 2-rank tensors can be represented as matrices (but strictly speaking are not matrices), and there are no specific names for higher-rank tensors.
Re:HPTT: A High-Performance Tensor Transposition C++ Library by jjtheblunt on Monday April 24, 2017 @12:54PM (#14185866)
Mathematica has been using that terminology since 1988, and was written by mathematicians and physicists.
Re:HPTT: A High-Performance Tensor Transposition C++ Library by Eliezer on Monday April 24, 2017 @12:41PM (#14185730)
Quietly raising my hand that this bugged me too.
Re:HPTT: A High-Performance Tensor Transposition C++ Library by tgb on Monday April 24, 2017 @01:42PM (#14186305)
Mathematics also uses tensor to refer to elements of a tensor product of two vector spaces. A tensor product of an n dimensional and an m dimensional space gives an n x m dimensional space. So to the extent that an array is a vector, a higher dimensional array is in a tensor product of vector spaces, and so we call it a tensor. Or, there's a correspondence between k-dimensional arrays an a tensor product of k vector spaces determined by a choice of bases of the vector spaces. And we're quite comfortable picking a "standard" basis for R^k, so we conflate the two ideas.

Now the part that always bugged me was that, at least in C++, a vector is an array that can change length, which is a very non-vectorial thing to do.

Re:HPTT: A High-Performance Tensor Transposition C++ Library by sentientsearch on Monday April 24, 2017 @12:35PM (#14185670)
Thanks. I've been meaning to read up on tensors as per tensorflow. Now I feel I don't need to.