SubPixelUpsample¶
- class SubPixelUpsample(in_channels, out_channels, upscale_factor=2)[source]¶
Sub-pixel upsampling module using PixelShuffle.
This module performs upsampling using sub-pixel convolution (PixelShuffle) which is more efficient than transposed convolution and produces better results.
- Parameters:
Initialize SubPixelUpsample.
- Parameters:
Methods
Forward pass through sub-pixel upsampling.
Attributes
training- forward(x)[source]¶
Forward pass through sub-pixel upsampling.
- Parameters:
x (torch.Tensor) – Input tensor of shape (B, C, H, W)
- Returns:
Upsampled tensor of shape (B, out_channels, H*upscale_factor, W*upscale_factor)
- Return type: