Skip to content
← All tracks

Matmul and einsum

PyTorch

Batched matrix multiplication and its broadcasting rules, then einsum as the tool that collapses a transpose, a matmul and a sum into one op that says what it means.

0 / 6 solved
  1. 1. Not solved yet. One weight matrix, every item
  2. 2. Not solved yet. Queries against keys
  3. 3. Not solved yet. Subscripts instead of transposes
  4. 4. Not solved yet. Star is not at
  5. 5. Not solved yet. Where you put the brackets
  6. 6. Not solved yet. One matrix, many batches

Check yourself

4 questions · one attempt each

These do not count toward finishing the track. They are here to catch the things that are easy to read past.

0 / 4

a is (2, 3) and b is (3, 4). What do a @ b and a * b give?

a @ b
a * b
Question 1 of 4