Tensor Stunts I: batch-aware attention computing

First part of tensor stunts.

Numpy and pytorch (and, more generally languages used for math computation) promote the replacement of good old for loops by creative use of the tensor libraries. As Python is inherently slow, this use can dramatic...

Continue reading...