Skip to main content

ClikaRT::ops::pixel_unshuffle

function

pixel_unshuffle()

Tensor pixel_unshuffle(
    Tensor x,
    int64_t downscale_factor,
    PixelShuffleMode mode = PixelShuffleMode::CRD
)

The inverse of pixel_shuffle (space-to-depth): channels-last [N, H, W, C] becomes [N, H/r, W/r, C*r^2].

Parameters

  • x: [N, H, W, C] with H, W divisible by r.
  • downscale_factor: r.
  • mode: the channel pack order. Default PixelShuffleMode::CRD.

Throws

  • ClikaRT::Error: when the input's dtype/shape is not served for this operation (the machine-readable reason rides code_name()).

Returns: [N, H/r, W/r, C*r^2].

Declared in ClikaRT/compute/ops.h, line 4511