JA EN

#broadcasting

1 articles

01 ·Linear Algebra·FREE·10 min read Tensors and Shape Manipulation — If You Can Read einsum, You Can Read Papers The Σ_j A_ij B_jk in the paper and the x.transpose(1,2) in the code say the same thing, and einsum is the bridge between them. Three tools — axes, broadcasting, contraction — are enough to write attention in a single line.