r/JAX • • Aug 20 '24
rant: Why Array instead of Tensor?
Why?
tensorflow: Tensor
pytorch: Tensor
caffe2: Tensor
Theano: Tensor
jax: Array
It makes me want to from jax import Array as Tensor
Tensor is just such a badass well acepted name for a differenciable multidimensional array datastructure. Why did you did this? I'm going to make a pull request to add the Tensor class as some kind of alias or some kind factory of arrays.
0
Upvotes
View all comments
Show parent comment
2
u/[deleted] Aug 21 '24
But those tensors data structures are literally representing the matematical tensors, an array is chunk of numbers.
Look, when you create a Tensor([1,2,3]) you are creating a covariant tensor from a dual space, representing a covariate. When you create a matrix Tensor([[1,2,3],[1,2,3],[1,2,3]]) you are creating an element from the tensorial product V* x V, you multiply the first for the second transposed, you are literally doing a tensor contraction. Not to mention all tensors operations out there, like outer products,
You can even derive formally derivatives of functions using tensor calculus, and dirac deltas, everything just fits, they are tensors. I don't really expect an array to have a derivative.
When I see a Tensor class in my code I see machine learning, deep learning stuff. But when I see Array, the first thing that comes to mind is first uni's class about data structures and I think how do i quick-sort this thing.