Is this similar to the following?
F1 = F1.unsquueze(0).repeat(M, 1, 1, 1, 1)      ([M, K, C, H, W])
F2 = F2.unsqueeze(1).repeat(1, K, 1, 1, 1)      (M, K ,C, H, W])
Fcat = torch.cat([F1, F2], dim=2)  ([M, K, 2C, H, W])