Solved by 111414 in post #4 
              
              
                I think torch.einsum — PyTorch 1.8.1 documentation works: 
import torch
m1 = torch.randn(256, 25)
m2 = torch.randn(25, 36, 36)
res = torch.einsum('bk, kij->bij', m1, m2)
print(res.shape)