torch.pixel_unshuffle
- torch.pixel_unshuffle(input, downscale_factor) → Tensor
Reverses the
PixelShuffleoperation by rearranging elements in a tensor of shape to a tensor of shape , where r is the .
Reverses the PixelShuffle operation by rearranging elements in a
tensor of shape to a tensor of shape
, where r is the .
downscale_factorSee PixelUnshuffle for details.
Examples:
>>> input = torch.randn(1, 1, 12, 12)
>>> output = torch.nn.functional.pixel_unshuffle(input, 3)
>>> print(output.size())
torch.Size([1, 9, 4, 4])