24.02.1
|
Basic function to compute a SoftmaxLayer and a Log SoftmaxLayer. More...
#include <NESoftmaxLayer.h>
Public Member Functions | |
NESoftmaxLayerGeneric (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Constructor. More... | |
NESoftmaxLayerGeneric (const NESoftmaxLayerGeneric &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NESoftmaxLayerGeneric (NESoftmaxLayerGeneric &&) | |
Default move constructor. More... | |
NESoftmaxLayerGeneric & | operator= (const NESoftmaxLayerGeneric &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NESoftmaxLayerGeneric & | operator= (NESoftmaxLayerGeneric &&) |
Default move assignment operator. More... | |
~NESoftmaxLayerGeneric () | |
Default destructor. More... | |
void | configure (ITensor *input, ITensor *output, float beta=1.0f, int32_t axis=0) |
Set the input and output tensors. 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, float beta=1.0f, int32_t axis=0) |
Static function to check if given info will lead to a valid configuration of NESoftmaxLayer. More... | |
Basic function to compute a SoftmaxLayer and a Log SoftmaxLayer.
Definition at line 40 of file NESoftmaxLayer.h.
NESoftmaxLayerGeneric | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Constructor.
Definition at line 48 of file NESoftmaxLayer.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
|
default |
Default destructor.
Set the input and output tensors.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
QASYMM8 | QASYMM8 |
QASYMM8_SIGNED | QASYMM8_SIGNED |
F16 | F16 |
F32 | F32 |
[in,out] | input | Source tensor. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. If the width is not a multiple of the internal processing block size, NEFillBorder replicates the last value of each row to the nearest multiple. |
[out] | output | Destination tensor. Data types supported: same as input . |
[in] | beta | (Optional) A scaling factor for the exponent. |
[in] | axis | (Optional) The dimension in which to apply the function. E.g. for input of shape 4x5x6 and axis=1, softmax will be applied to 4x6=24 vectors of size 5. Defaults to 0 |
Definition at line 62 of file NESoftmaxLayer.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, ARM_COMPUTE_ERROR_ON_NULLPTR, ITensor::info(), and arm_compute::test::validation::input.
|
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 85 of file NESoftmaxLayer.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR.
|
static |
Static function to check if given info will lead to a valid configuration of NESoftmaxLayer.
[in] | input | Source tensor info. Data types supported: QASYMM8/QASYMM8_SIGNED/F16/F32. |
[in] | output | Destination tensor info. Data types supported: same as input |
[in] | beta | (Optional) A scaling factor for the exponent. |
[in] | axis | (Optional) The dimension in which to apply the function. E.g. for input of shape 4x5x6 and axis=1, softmax will be applied to 4x6=24 vectors of size 5. Defaults to 0 |
Definition at line 77 of file NESoftmaxLayer.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::test::validation::input, and CpuSoftmaxGeneric::validate().