Solved by tom in post #6 
              
              
                torch.einsum('bi,ij,bj', U, M, V) if you want the sum, 'bi,ij,bj->b' if you prefer the batch items separately.  
Best regards 
Thomas