ShuffleChannels

Versioned name: ShuffleChannels-1

Name: ShuffleChannels

Category: Data movement

Short description: ShuffleChannels permutes data in the channel dimension of the input tensor.

Attributes:

Inputs:

Outputs:

Mathematical Formulation

The operation is the equivalent with the following transformation of the input tensor x of shape [N, C, H, W]:

x' = reshape(x, [N, group, C / group, H * W])
x'' = transpose(x', [0, 2, 1, 3])
y = reshape(x'', [N, C, H, W])

where group is the layer parameter described above and the axis = 1.

Example

<layer ... type="ShuffleChannels" ...>
<data group="3" axis="1"/>
<input>
<port id="0">
<dim>5</dim>
<dim>12</dim>
<dim>200</dim>
<dim>400</dim>
</port>
</input>
<output>
<port id="1">
<dim>5</dim>
<dim>12</dim>
<dim>200</dim>
<dim>400</dim>
</port>
</output>
</layer>