ClikaRT::ops::pixel_shuffle
function
pixel_shuffle()
Tensor pixel_shuffle(
Tensor x,
int64_t upscale_factor,
PixelShuffleMode mode = PixelShuffleMode::CRD
)
Rearranges channels into space (depth-to-space): channels-last [N, H, W, C] becomes [N, H*r, W*r, C/r^2].
Parameters
x:[N, H, W, C]withCdivisible byr^2.upscale_factor:r.mode: the channel unpack order (CRD/DCR). DefaultPixelShuffleMode::CRD.
Throws
ClikaRT::Error: when the input's dtype/shape is not served for this operation (the machine-readable reason ridescode_name()).
Returns: [N, H*r, W*r, C/r^2].
Declared in ClikaRT/compute/ops.h, line 4500