class torch.nn.PixelShuffle(upscale_factor)

$(,\; C\times r^2,\; H, \; W)$ → $(,\; C,\; H\times r, \; W\times r)$ 로 요소들을 rearrange해준다

r은 upscale factor이다

stride 1/r로 efficient sub-pixel conv를 적용할 때 유용하다

PixelShuffle - PyTorch 1.11.0 documentation

Untitled

Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network

이 논문에서 나온 방법이다

Untitled

원본이 (H, W, 3)이미지라면 이를 마지막 레이어에서 (H, W, 3 x $r^2$) 로 만들어서 순서대로 조합해 (Hxr, Wxr, 3) 의 이미지를 만들어내는 것이다

Untitled

Untitled