dmlc / dlpack

common in-memory tensor structure
https://dmlc.github.io/dlpack/latest
Apache License 2.0
905 stars 133 forks source link

Don't call it tensor #46

Closed inducer closed 3 years ago

inducer commented 4 years ago

Just call it "multi/n-dimensional array". Tensor is a word with a very specific mathematical meaning. Calling any n-dimensional array a tensor is incorrect in the same way that calling every two-dimensional array a matrix is wrong. Numpy set a correct precedent. There's no reason to do worse than numpy.

tqchen commented 4 years ago

Thanks @inducer , I personally do not disagree, and I think we could be more than happy to change the README and other docs into multi-dimensional array or ndarray.

Change the structure name, however, is a bit more involving as it will means backward compatibility issues and would need more deliberation. So we will have to stick with the name for a while, we could propose a different name and use typedef to get alias.

csukuangfj commented 4 years ago

I guess it is now a convention to call an n-d array Tensor in the deep learning community.

For example, both TensorFlow and PyTorch name its basic data structure as Tensor.

mratsim commented 3 years ago

Field are very specific mathematical objects with addition, substraction, multiplication, division, neutral elements, commutativity and associativity.

Physicists talk about electrical fields or magnetic fields which do not have those properties and mathematicians are fine with that as far as I'm aware. They are also fine with people being experts in certain fields, even though those people might not be divisible.

In deep learning, tensor has a very specific meaning that is understood by everyone, that's the purpose of a language. Tensor is a fine name.

tqchen commented 3 years ago

Closing for now as most of the opinions are expressed. We agree it would be great to clarify that Tensor means n-dimensional array in this context, but will keep the data structure names. Thanks everyone for sharing the thoughts