For example, I got matrix A of shape (3,2,2), e.g.
[ [[1,1],[1,1]], [[2,2],[2,2]], [[3,3],[3,3]] ]
and matrix B of shape (2,2), e.g.
Another solution:
np.flip(np.dot(A,B).transpose((0,2,1)),1)