Compute Library
 19.11
NEActivationLayer Class Reference

Basic function to run NEActivationLayerKernel. More...

#include <NEActivationLayer.h>

Collaboration diagram for NEActivationLayer:
[legend]

Public Member Functions

 NEActivationLayer (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 NEActivationLayer (const NEActivationLayer &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 NEActivationLayer (NEActivationLayer &&)=default
 Default move constructor. More...
 
NEActivationLayeroperator= (const NEActivationLayer &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
NEActivationLayeroperator= (NEActivationLayer &&)=default
 Default move assignment operator. More...
 
void configure (ITensor *input, ITensor *output, ActivationLayerInfo activation_info)
 [NEActivationLayer snippet] 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...
 
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, const ActivationLayerInfo &act_info)
 [NEActivationLayer snippet] More...
 

Detailed Description

Basic function to run NEActivationLayerKernel.

Note
The function simulates an activation layer with the specified activation function.

Definition at line 40 of file NEActivationLayer.h.

Constructor & Destructor Documentation

◆ NEActivationLayer() [1/3]

NEActivationLayer ( IRuntimeContext ctx = nullptr)

Constructor.

Parameters
[in]ctxRuntime context to be used by the function

Definition at line 32 of file NEActivationLayer.cpp.

34 {
35 }
INESimpleFunctionNoBorder(IRuntimeContext *ctx=nullptr)
Constructor.

◆ NEActivationLayer() [2/3]

NEActivationLayer ( const NEActivationLayer )
delete

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

◆ NEActivationLayer() [3/3]

Default move constructor.

Member Function Documentation

◆ configure()

void configure ( ITensor input,
ITensor output,
ActivationLayerInfo  activation_info 
)

[NEActivationLayer snippet]

Set the input and output tensor.

Note
If the output tensor is a nullptr or is equal to the input, the activation function will be performed in-place
Parameters
[in,out]inputSource tensor. In case of output tensor = nullptr, this tensor will store the result of the activation function. Data types supported: QASYMM8/QSYMM16/F16/F32.
[out]outputDestination tensor. Data type supported: same as input
[in]activation_infoActivation layer parameters.

Definition at line 36 of file NEActivationLayer.cpp.

37 {
38  auto k = arm_compute::support::cpp14::make_unique<NEActivationLayerKernel>();
39  k->configure(input, output, activation_info);
40  _kernel = std::move(k);
41 }

References arm_compute::test::validation::input.

Referenced by NEDirectConvolutionLayer::configure(), NEWinogradConvolutionLayer::configure(), NEFFTConvolutionLayer::configure(), NEGEMM::configure(), NEGEMMLowpMatrixMultiplyCore::configure(), NELSTMLayerQuantized::configure(), and arm_compute::test::validation::TEST_CASE().

◆ operator=() [1/2]

NEActivationLayer& operator= ( const NEActivationLayer )
delete

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

◆ operator=() [2/2]

NEActivationLayer& operator= ( NEActivationLayer &&  )
default

Default move assignment operator.

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo output,
const ActivationLayerInfo act_info 
)
static

[NEActivationLayer snippet]

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

Parameters
[in]inputSource tensor info. In case of output tensor info = nullptr, this tensor will store the result of the activation function. Data types supported: QASYMM8/QSYMM16/F16/F32.
[in]outputDestination tensor info. Data type supported: same as input
[in]act_infoActivation layer information.
Returns
a status

Definition at line 43 of file NEActivationLayer.cpp.

44 {
46 }
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ActivationLayerInfo &act_info)
Static function to check if given info will lead to a valid configuration of NEActivationLayerKernel.

References arm_compute::test::validation::act_info, arm_compute::test::validation::input, and NEActivationLayerKernel::validate().

Referenced by NEDirectConvolutionLayer::validate(), NEGEMM::validate(), NEGEMMLowpMatrixMultiplyCore::validate(), NEFFTConvolutionLayer::validate(), and NELSTMLayerQuantized::validate().


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