---
title: "ClikaRT::nn::PixelShuffle"
sidebar_label: "PixelShuffle"
description: "Moves channels into the spatial axes: [N, H, W, C * r * r] to [N, H * r, W * r, C] for the factor r."
---

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

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

**Header:** `ClikaRT/nn/generated/pixelshuffle.h`  
**Inherits:** [`ClikaRT::nn::Module`](./Module.md)

Moves channels into the spatial axes: `[N, H, W, C * r * r]` to `[N, H * r, W * r, C]` for the factor `r`. The module form of [`ClikaRT::ops::pixel_shuffle`](../ops/pixel_shuffle.md#pixel_shuffle), which documents the full contract (shapes, dtypes, errors); construct once, then call it like a function.

## Member functions

### PixelShuffle(PixelShuffleOptions) {#PixelShuffle}

<div class="api-signature">

`explicit` **`PixelShuffle`**([`PixelShuffleOptions`](./PixelShuffleOptions.md) `options`)

</div>

Constructs the module from [`options`](./PixelShuffle.md#options).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/pixelshuffle.h`, line 62

</div>

### PixelShuffle(int64\_t) {#PixelShuffle-2}

<div class="api-signature">

`explicit` **`PixelShuffle`**(`std::int64_t` `upscale_factor`)

</div>

`PixelShuffle(upscale_factor)`: the positional form of `PixelShuffleOptions(upscale_factor)`.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/pixelshuffle.h`, line 65

</div>

### forward() {#forward}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`forward`**([`Tensor`](../Tensor.md) `input`) `const`

</div>

[`forward_impl`](./PixelShuffle.md#forward), unwrapped: raises [`ClikaRT::Error`](../Error.md) on failure.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/pixelshuffle.h`, line 78

</div>

### operator()() {#operator-call}

<div class="api-signature">

[`Tensor`](../Tensor.md) **`operator()`**([`Tensor`](../Tensor.md) `input`) `const`

</div>

Same as [`forward`](./PixelShuffle.md#forward).

<div class="api-declared">

Declared in `ClikaRT/nn/generated/pixelshuffle.h`, line 82

</div>

### options() {#options}

<div class="api-signature">

`const` [`PixelShuffleOptions`](./PixelShuffleOptions.md)`&` **`options`**() `const`

</div>

The settings this module was constructed with.

<div class="api-declared">

Declared in `ClikaRT/nn/generated/pixelshuffle.h`, line 86

</div>
