---
title: "ClikaRT::ops::pixel_unshuffle"
sidebar_label: "pixel_unshuffle"
description: "The inverse of pixel_shuffle (space-to-depth): channels-last [N, H, W, C] becomes [N, H/r, W/r, C*r^2]. input [N, H, W, C] with H, W divisible by r. downscale_factor r. mode the channel pack order."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--function">function</span>

## pixel\_unshuffle() {#pixel_unshuffle}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`pixel_unshuffle`**(<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`Tensor`](../Tensor.md) `input`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;`int64_t` `downscale_factor`,<br />
&nbsp;&nbsp;&nbsp;&nbsp;[`PixelShuffleMode`](./index.md#PixelShuffleMode) `mode` `=` [`PixelShuffleMode::CRD`](./index.md#PixelShuffleMode)<br />
)

</div>

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

**Parameters**

- `input`: `[N, H, W, C]` with `H`, `W` divisible by `r`.
- `downscale_factor`: `r`.
- `mode`: the channel pack order. Default [`PixelShuffleMode::CRD`](./index.md#PixelShuffleMode).

**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]`.

<div class="api-declared">

Declared in `ClikaRT/compute/ops.h`, line 4649

</div>
