Hi Fly!



 Fly2Fly:


But if X1 = [B,N1,D], X2 = [B,N2,D], and the B notes bathsize,
If I want batch-wise calculation of matrix multiplication,



Use torch.bmm() (“batch matrix-matrix”), together with torch.transpose()
to line up the D dimensions properly:
S = torch.bmm (X1, torch.transpose (X2, 1, 2))

Best.
K. Frank