5 ms·
Faster tensor transposition, which can speed up applications that do manipulation and calculation with tensors. Tensors are typically seen in physics.
by Langdal 9y ago
Faster tensor transposition, which can speed up applications that do manipulation and calculation with tensors. Tensors are typically seen in physics.
- kgwgk 9y agoFor some reason, people use now the name "tensor" to refer to multidimensional arrays.
- wohlergehen 9y agoIn 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.
- kgwgk 9y agoExcept 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.
- azag0 9y agoThe 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.
- nabla9 9y agoProbably 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.
- azag0 9y agoA 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.
- nabla9 9y agoYou 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.
- tome 9y ago> 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!
- deleted 9y ago[deleted]
- radarsat1 9y agoIt 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.
- sentientsearch 9y agoThanks. I've been meaning to read up on tensors as per tensorflow. Now I feel I don't need to.
- Eliezer 9y agoQuietly raising my hand that this bugged me too.
- tgb 9y agoMathematics 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.
- jjtheblunt 9y agoMathematica has been using that terminology since 1988, and was written by mathematicians and physicists.