Solved by ptrblck in post #2 
              
              
                This should work: 
x = torch.arange(2 * 4 * 2).view(2, 4, 2)
y = torch.arange(2 * 4 * 2).view(2, 4, 2)
z = x[:, :, None, 0] * y[:, None, :, 1]