Named Tensors
Named Tensors allow users to give explicit names to tensor dimensions.
In most cases, operations that take dimension parameters will accept
dimension names, avoiding the need to track dimensions by position. In
addition, named tensors use names to automatically check that APIs are
being used correctly at runtime, providing extra safety. Names can
also be used to rearrange dimensions, for example, to support
"broadcasting by name" rather than "broadcasting by position".
Warning:
The named tensor API is a prototype feature and subject to change.
Creating named tensors
Factory functions now take a new "names" argument that associates a
name with each dimension.



torch.zeros(2, 3, names=('N', 'C'))
   tensor([[0., 0., 0.],
           [0., 0., 0.]], names=('N', 'C'))



Named dimensions, like regular Tensor dimensions, are ordered.
"tensor.names[i]" is the name of dimension "i" of "tensor".
The following factory functions support named tensors: