24.02.1
|
Basic function to run cpu::kernels::CpuActivationKernel. More...
#include <NEActivationLayer.h>
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 move constructor. More... | |
NEActivationLayer & | operator= (const NEActivationLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEActivationLayer & | operator= (NEActivationLayer &&) |
Default move assignment operator. More... | |
~NEActivationLayer () | |
Destructor. More... | |
void | configure (ITensor *input, ITensor *output, ActivationLayerInfo activation_info) |
[NEActivationLayer snippet] More... | |
void | run () override |
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... | |
Basic function to run cpu::kernels::CpuActivationKernel.
Definition at line 44 of file NEActivationLayer.h.
NEActivationLayer | ( | IRuntimeContext * | ctx = nullptr | ) |
Constructor.
[in] | ctx | Runtime context to be used by the function |
Definition at line 40 of file NEActivationLayer.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
|
default |
Destructor.
void configure | ( | ITensor * | input, |
ITensor * | output, | ||
ActivationLayerInfo | activation_info | ||
) |
[NEActivationLayer snippet]
Set the input and output tensor.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
QASYMM8 | QASYMM8 |
QASYMM8_SIGNED | QASYMM8_SIGNED |
QSYMM16 | QSYMM16 |
F16 | F16 |
F32 | F32 |
[in,out] | input | Source tensor. In case of output tensor = nullptr, this tensor will store the result of the activation function. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM16/F16/F32. |
[out] | output | Destination tensor. Data type supported: same as input |
[in] | activation_info | Activation layer parameters. |
Definition at line 48 of file NEActivationLayer.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, and arm_compute::test::validation::input.
Referenced by NERNNLayer::configure(), NEFFTConvolutionLayer::configure(), NELSTMLayerQuantized::configure(), NELSTMLayer::configure(), NEQLSTMLayer::configure(), and arm_compute::test::validation::TEST_CASE().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move assignment operator.
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 65 of file NEActivationLayer.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, ITensorPack::add_tensor(), and arm_compute::test::validation::pack.
Referenced by NERNNLayer::run(), NEFFTConvolutionLayer::run(), NELSTMLayerQuantized::run(), NELSTMLayer::run(), NEQLSTMLayer::run(), and arm_compute::test::validation::TEST_CASE().
|
static |
[NEActivationLayer snippet]
Static function to check if given info will lead to a valid configuration of NEActivationLayer
[in] | input | Source tensor info. In case of output tensor info = nullptr, this tensor will store the result of the activation function. Data types supported: QASYMM8/QASYMM8_SIGNED/QSYMM16/F16/F32. |
[in] | output | Destination tensor info. Data type supported: same as input |
[in] | act_info | Activation layer information. |
Definition at line 60 of file NEActivationLayer.cpp.
References arm_compute::test::validation::act_info, arm_compute::test::validation::input, and CpuActivation::validate().
Referenced by NERNNLayer::validate(), NEFFTConvolutionLayer::validate(), NELSTMLayerQuantized::validate(), NELSTMLayer::validate(), and NEQLSTMLayer::validate().