Dragon API Dragon v0.3.0 Python PixelShuffle¶ class dragon.vm.torch.nn.PixelShuffle( upscale_factor, inplace=False)[source]¶ Rearrange depth elements into pixels. Examples: m = torch.nn.PixelShuffle(2) x = torch.arange(1 * 12 * 1 * 1).reshape((1, 12, 1, 1)) print(m(x).size()) # [1, 3, 2, 2] See also torch.nn.functional.pixel_shuffle(…) __init__¶ PixelShuffle.__init__( upscale_factor, inplace=False)[source]¶ Create a PixelShuffle module. Parameters: upscale_factor (int) – The factor to upscale pixels. inplace (bool, optional, default=False) – Whether to do the operation in-place.