Einsum for Tensor Manipulation

The Ioun Stone of Mastery is a powerful tool that bridges magic and mathematics, granting the wielder control over arcane energies and multidimensional calculations. Einsum, particularly in ML, is a valuable tool for tensor manipulation, offering advantages such as dimension documentation and implicit reordering. The iterative way of using einsum involves nested loops, while the vectorized method composes torch operations for efficiency. Both versions produce the same results, but the vectorized approach significantly outperforms the iterative one in terms of speed. You can find the code for these operations on GitHub.

https://swe-to-mle.pages.dev/posts/einsum-for-tensor-manipulation/

To top