def pixel_unshuffle(input, downscale_factor):
    '\n    input: batchSize * c * k*w * k*h\n    downscale_factor: k\n    batchSize * c * k*w * k*h -> batchSize * k*k*c * w * h\n    '
    c = input.shape[1]
    kernel = torch.zeros(size=[((downscale_factor * downscale_factor) * c), 1, downscale_factor, downscale_factor], device=input.device)
    for y in range(downscale_factor):
        for x in range(downscale_factor):
            kernel[(x + (y * downscale_factor))::(downscale_factor * downscale_factor), 0, y, x] = 1
    return F.conv2d(input, kernel, stride=downscale_factor, groups=c)
input: batchSize * c * k*w * k*h
downscale_factor: k
batchSize * c * k*w * k*h -> batchSize * k*k*c * w * h
def pixel_unshuffle(input, downscale_factor):
    '\n    input: batchSize * c * k*w * k*h\n    downscale_factor: k\n    batchSize * c * k*w * k*h -> batchSize * k*k*c * w * h\n    '
    c = input.shape[1]
    kernel = torch.zeros(size=[((downscale_factor * downscale_factor) * c), 1, downscale_factor, downscale_factor], device=input.device)
    for y in range(downscale_factor):
        for x in range(downscale_factor):
            kernel[(x + (y * downscale_factor))::(downscale_factor * downscale_factor), 0, y, x] = 1
    return F.conv2d(input, kernel, stride=downscale_factor, groups=c)