x3 = torch.cat((x1, x2), dim=1) b, n, h, w = x3 .size() b_n = b * n // 2 y = x3 .reshape(b_n, 2, h * w) y = y.permute(1, 0, 2) y = y.reshape(2, -1, n // 2, h, w) 等于 y = torch.cat([x1[:, ::2], x2[:, ::2], x1[:, 1::2], x2[:, 1::2]], dim=1) 这与两个卷积的对应通道数挨在一起不符合