Batched matmul with einsum

I’m not sure if this can be inferred, but on a separate note you’d probably be better off making k,l the trailing dimensions, since Julia is column-major (unlike numpy).

One option might be to use reshape to re-interpret any number of trailing dimensions into a single dimension.

2 Likes