(∗,C×r2,H,W)
- Parameters:
downscale_factor (int) – factor to decrease spatial resolution by
- Shape:
Input: (∗,Cin,Hin,Win), where * is zero or more batch dimensions
Output: (∗,Cout,Hout,Wout), where
Cout=Cin×downscale_factor2 Hout=Hin÷downscale_factor Wout=Win÷downscale_factor pixel_unshuffle = nn.PixelUnshuffle(3)
input = torch.randn(1, 1, 12, 12)
output = pixel_unshuffle(input)
print(output.size())
torch.Size([1, 9, 4, 4])
Return the extra representation of the module.
- Return type:
str
-
forward(input)
Runs the forward pass.
- Return type:
Tensor