I have a batch of matrix A(A.shape=torch.Size([2, 3, 4])), and a matrix B(B.shape=torch.Size([4, 3])). In my opinion, I think A consists of two parts:A1 and A2.(A1.shape=torch.Size([3, 4], A2.shape=torch.Size([3, 4]).
How can I multy B and A1 and A2 apartly?  My excepted result is (shape=torch.Size([2, 3, 3]).