torch.pixel_unshuffle
-
torch.pixel_unshuffle(input, downscale_factor) → Tensor -
Выполняет обратную операцию по отношению к
PixelShuffle, переставляя элементы тензора формы в тензор формы , где r —downscale_factor.Подробнее см. в описании
PixelUnshuffle.- Параметры:
Примеры:
>>> input = torch.randn(1, 1, 12, 12) >>> output = torch.nn.functional.pixel_unshuffle(input, 3) >>> print(output.size()) torch.Size([1, 9, 4, 4])
© 2026, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://docs.pytorch.org/docs/2.14/generated/torch.pixel_unshuffle.html