torch.nn.functional.pixel_shuffle¶
-
torch.nn.functional.
pixel_shuffle
(input, upscale_factor) → Tensor¶ Rearranges elements in a tensor of shape to a tensor of shape , where r is the
upscale_factor
.See
PixelShuffle
for details.- Parameters
Examples:
>>> input = torch.randn(1, 9, 4, 4) >>> output = torch.nn.functional.pixel_shuffle(input, 3) >>> print(output.size()) torch.Size([1, 1, 12, 12])