Thanks for the hints.
Indeed, I can solve this by just using matrix-matrix mulptiplies (I got confused with the batch dim), which is what my code was unknowingly trying to accomplish.
Just for the record, @ is actually only for versions > 3.4.