Understanding PyTorch einsum
Since the description of einsum is skimpy in torch documentation, I decided to write this post to document, compare and contrast how torch.einsum() behaves when compared to numpy.einsum(). Differences: NumPy allows both small case and capitalized letters [a-zA-Z] for the “subscript string” whereas PyTorch allows only the small case letters [a-z]. NumPy accepts nd-arrays, plain … Read more