Compute Library
 21.02
NEMeanStdDevNormalizationLayer Class Reference

Basic function to execute mean and standard deviation normalization by calling NEMeanStdDevNormalizationKernel. More...

#include <NEMeanStdDevNormalizationLayer.h>

Collaboration diagram for NEMeanStdDevNormalizationLayer:
[legend]

Public Member Functions

 NEMeanStdDevNormalizationLayer ()=default
 Constructor. More...
 
 NEMeanStdDevNormalizationLayer (const NEMeanStdDevNormalizationLayer &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
NEMeanStdDevNormalizationLayeroperator= (const NEMeanStdDevNormalizationLayer &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 NEMeanStdDevNormalizationLayer (NEMeanStdDevNormalizationLayer &&)=delete
 Prevent instances of this class from being moved (As this class contains non movable objects) More...
 
NEMeanStdDevNormalizationLayeroperator= (NEMeanStdDevNormalizationLayer &&)=delete
 Prevent instances of this class from being moved (As this class contains non movable objects) More...
 
 ~NEMeanStdDevNormalizationLayer ()
 Default destructor. More...
 
void configure (ITensor *input, ITensor *output=nullptr, float epsilon=1e-8f)
 Initialise the function's input and outputs. More...
 
- Public Member Functions inherited from INESimpleFunctionNoBorder
 INESimpleFunctionNoBorder (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 INESimpleFunctionNoBorder (const INESimpleFunctionNoBorder &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INESimpleFunctionNoBorder (INESimpleFunctionNoBorder &&)=default
 Default move constructor. More...
 
INESimpleFunctionNoBorderoperator= (const INESimpleFunctionNoBorder &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INESimpleFunctionNoBorderoperator= (INESimpleFunctionNoBorder &&)=default
 Default move assignment operator. More...
 
 ~INESimpleFunctionNoBorder ()
 Default destructor. 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=nullptr, float epsilon=1e-8f)
 Static function to check if given info will lead to a valid configuration of NEMeanStdDevNormalizationKernel. More...
 

Detailed Description

Basic function to execute mean and standard deviation normalization by calling NEMeanStdDevNormalizationKernel.

Definition at line 36 of file NEMeanStdDevNormalizationLayer.h.

Constructor & Destructor Documentation

◆ NEMeanStdDevNormalizationLayer() [1/3]

Constructor.

◆ NEMeanStdDevNormalizationLayer() [2/3]

Prevent instances of this class from being copied (As this class contains pointers)

◆ NEMeanStdDevNormalizationLayer() [3/3]

Prevent instances of this class from being moved (As this class contains non movable objects)

◆ ~NEMeanStdDevNormalizationLayer()

Default destructor.

Member Function Documentation

◆ configure()

void configure ( ITensor input,
ITensor output = nullptr,
float  epsilon = 1e-8f 
)

Initialise the function's input and outputs.

Note
If the output tensor is a nullptr, the normalization will be performed in-place.
Parameters
[in,out]inputInput tensor with 2 dimensions. Data types supported: F16/F32.
[out]output(Optional) Destination tensor. It can be nullptr in case of in-place computation. Data type supported: same as input
[in]epsilon(Optional) Small float to avoid division by zero in case of zero standard deviation. Defaults to 1e-8.

Definition at line 32 of file NEMeanStdDevNormalizationLayer.cpp.

Referenced by NELSTMLayer::configure().

33 {
34  auto k = std::make_unique<NEMeanStdDevNormalizationKernel>();
35  k->configure(input, output, epsilon);
36  _kernel = std::move(k);
37 }

◆ operator=() [1/2]

Prevent instances of this class from being copied (As this class contains pointers)

◆ operator=() [2/2]

Prevent instances of this class from being moved (As this class contains non movable objects)

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo output = nullptr,
float  epsilon = 1e-8f 
)
static

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

Parameters
[in]inputSource tensor info with 2 dimensions. In case of output tensor info = nullptr, this tensor will store the result of the normalization. Data types supported: F16/F32.
[in]output(Optional) Destination tensor info. It can be nullptr in case of in-place computation. Data type supported: same as input
[in]epsilon(Optional) Small float to avoid division by zero in case of zero standard deviation. Defaults to 1e-8.
Returns
a status

Definition at line 39 of file NEMeanStdDevNormalizationLayer.cpp.

References NEMeanStdDevNormalizationKernel::validate().

Referenced by NELSTMLayer::validate().

40 {
42 }
static Status validate(const ITensorInfo *input, const ITensorInfo *output=nullptr, float epsilon=1e-8f)
Static function to check if given info will lead to a valid configuration of NEMeanStdDevNormalizatio...

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