Compute Library
 19.08
NEChannelShuffleLayer Class Reference

Basic function to run NEChannelShuffleLayerKernel. More...

#include <NEChannelShuffleLayer.h>

Collaboration diagram for NEChannelShuffleLayer:
[legend]

Public Member Functions

void configure (const ITensor *input, ITensor *output, unsigned int num_groups)
 Initialize the function. More...
 
- Public Member Functions inherited from INESimpleFunctionNoBorder
 INESimpleFunctionNoBorder ()
 Constructor. More...
 
void run () override final
 Run the kernels contained in the function. More...
 
- Public Member Functions inherited from IFunction
virtual ~IFunction ()=default
 Destructor. More...
 
virtual void prepare ()
 Prepare the function for executing. More...
 

Static Public Member Functions

static Status validate (const ITensorInfo *input, const ITensorInfo *output, unsigned int num_groups)
 Static function to check if given info will lead to a valid configuration of NEChannelShuffleLayer. More...
 

Detailed Description

Basic function to run NEChannelShuffleLayerKernel.

Note
The function performs a channel shuffle operation on the input tensor. Given NCHW tensor with group G, it will first divide the channels into G groups, C = (G * C'), and perform a transpose of the channel, which gives C = (C' * G). for more details see: https://arxiv.org/pdf/1707.01083.pdf

Definition at line 40 of file NEChannelShuffleLayer.h.

Member Function Documentation

◆ configure()

void configure ( const ITensor input,
ITensor output,
unsigned int  num_groups 
)

Initialize the function.

Parameters
[in]inputInput tensor. Data types supported: U8/S8/QASYMM8/U16/S16/F16/U32/S32/F32
[out]outputOutput tensor. Data type supported: Same as input
[in]num_groupsNumber of groups. Must be greater than 1 and the number of channels of the tensors must be a multiple of the number of groups.

Definition at line 32 of file NEChannelShuffleLayer.cpp.

33 {
34  auto k = arm_compute::support::cpp14::make_unique<NEChannelShuffleLayerKernel>();
35  k->configure(input, output, num_groups);
36  _kernel = std::move(k);
37 }
const unsigned int num_groups
Definition: Im2Col.cpp:148

References arm_compute::test::validation::num_groups.

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo output,
unsigned int  num_groups 
)
static

Static function to check if given info will lead to a valid configuration of NEChannelShuffleLayer.

Parameters
[in]inputInput tensor. Data types supported: U8/S8/QASYMM8/U16/S16/F16/U32/S32/F32
[out]outputOutput tensor. Data type supported: Same as input
[in]num_groupsNumber of groups. Must be greater than 1 and the number of channels of the tensors must be a multiple of the number of groups.
Returns
a status

Definition at line 39 of file NEChannelShuffleLayer.cpp.

40 {
42 }
static Status validate(const ITensorInfo *input, const ITensorInfo *output, unsigned int num_groups)
Static function to check if given info will lead to a valid configuration of NEChannelShuffleLayerKer...
const unsigned int num_groups
Definition: Im2Col.cpp:148

References arm_compute::test::validation::num_groups, and NEChannelShuffleLayerKernel::validate().


The documentation for this class was generated from the following files: