개발챙 AI study
/
Pytorch
/
nn.Pixel Shuffle
Search
Share
nn.Pixel Shuffle
class torch.nn.PixelShuffle(upscale_factor)
(
∗
,
C
×
r
2
,
H
,
W
)
(*,\; C\times r^2,\; H, \; W)
(
∗
,
C
×
r
2
,
H
,
W
)
→
(
∗
,
C
,
H
×
r
,
W
×
r
)
(*,\; C,\; H\times r, \; W\times r)
(
∗
,
C
,
H
×
r
,
W
×
r
)
로 요소들을 rearrange해준다
r은 upscale factor이다
stride 1/r로 efficient sub-pixel conv를 적용할 때 유용하다
PixelShuffle - PyTorch 1.11.0 documentation
Join the PyTorch developer community to contribute, learn, and get your questions answered.
Real-Time Single Image and Video Super-Resolution Using an Efficient Sub-Pixel Convolutional Neural Network
Recently, several models based on deep neural networks have achieved great success in terms of both reconstruction accuracy and computational performance for single image super-resolution. In these methods, the low resolution (LR) input image is upscaled to the high resolution (HR) space using a single filter, commonly bicubic interpolation, before reconstruction.
이 논문에서 나온 방법이다
원본이 (H, W, 3)이미지라면 이를 마지막 레이어에서 (H, W, 3 x
r
2
r^2
r
2
) 로 만들어서 순서대로 조합해 (Hxr, Wxr, 3) 의 이미지를 만들어내는 것이다