Tensor Considered Harmful
Lambda the Ultimate - Programming Languages Weblog 2019-06-27
Summary:
Tensor Considered Harmful, by Alexander Rush
TL;DR: Despite its ubiquity in deep learning, Tensor is broken. It forces bad habits such as exposing private dimensions, broadcasting based on absolute position, and keeping type information in documentation. This post presents a proof-of-concept of an alternative approach, named tensors, with named dimensions. This change eliminates the need for indexing, dim arguments, einsum- style unpacking, and documentation-based coding. The prototype PyTorch library accompanying this blog post is available as namedtensor.
Thanks to Edward Z. Yang for pointing me to this "Considered Harmful" position paper.