Compute Library
 19.08
NEActivationLayer Class Reference

Basic function to run NEActivationLayerKernel. More...

#include <NEActivationLayer.h>

Collaboration diagram for NEActivationLayer:
[legend]

Public Member Functions

void configure (ITensor *input, ITensor *output, ActivationLayerInfo activation_info)
 Set the input and output tensor. 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, const ActivationLayerInfo &act_info)
 Static function to check if given info will lead to a valid configuration of NEActivationLayer. More...
 

Detailed Description

Basic function to run NEActivationLayerKernel.

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

Definition at line 39 of file NEActivationLayer.h.

Member Function Documentation

◆ configure()

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

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 31 of file NEActivationLayer.cpp.

32 {
33  auto k = arm_compute::support::cpp14::make_unique<NEActivationLayerKernel>();
34  k->configure(input, output, activation_info);
35  _kernel = std::move(k);
36 }

Referenced by NEDirectConvolutionLayer::configure(), NEWinogradConvolutionLayer::configure(), NEDepthwiseConvolutionLayer3x3::configure(), NEFFTConvolutionLayer::configure(), NELSTMLayerQuantized::configure(), NEGEMMConvolutionLayer::configure(), NEDepthwiseConvolutionLayerOptimized::configure(), NEDepthwiseConvolutionLayer::configure(), and arm_compute::test::validation::TEST_CASE().

◆ validate()

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

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 38 of file NEActivationLayer.cpp.

39 {
40  return NEActivationLayerKernel::validate(input, output, act_info);
41 }
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, and NEActivationLayerKernel::validate().

Referenced by NEDirectConvolutionLayer::validate(), NEDepthwiseConvolutionLayer3x3::validate(), NEFFTConvolutionLayer::validate(), NELSTMLayerQuantized::validate(), NEGEMMConvolutionLayer::validate(), NEDepthwiseConvolutionLayerOptimized::validate(), and NEDepthwiseConvolutionLayer::validate().


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