Solved by Caruso in post #2 
              
              
                Hi @Tomasz_Dryjanski , 
have a look at torch.bmm, it computes a matrix multiplication for each corresponding matrix pair. 
Here is an example of what you want to do: 
import torch

a = torch.Tensor([[1, 2, 3], [4, 5, 6]]).float()
b = torch.Tensor([[[ 1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]],
  …