I have two matrices A and B. A and B have the same number of rows (m), and different number of columns. A.shape = [m,M], B.shape = [m,N]. For each row of A and B, I want to do an outer product (torch.outer).
Is there a way not using loop, because m is very large and I need to do this operation many times.