I’m performing a batched matmul using Einsum. Is there a clean way to infer leading dimensions, like I can with numpy?
For example, I’m currently doing this:
@einsum C[k, l, m, j] = A[i, j] * B[k, l, m, j]
But it’d be great to be able to do something like this…
@einsum C[..., m, j] = A[i, j] * B[m, j]
so that this can work with a B
of arbitrary dimensions.