23.08
|
Basic function to perform a L2 normalization on a given axis. More...
#include <CLL2NormalizeLayer.h>
Public Member Functions | |
CLL2NormalizeLayer (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Constructor. More... | |
~CLL2NormalizeLayer () | |
Default Destructor. More... | |
CLL2NormalizeLayer (const CLL2NormalizeLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLL2NormalizeLayer (CLL2NormalizeLayer &&)=default | |
Default move constructor. More... | |
CLL2NormalizeLayer & | operator= (const CLL2NormalizeLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLL2NormalizeLayer & | operator= (CLL2NormalizeLayer &&)=default |
Default move assignment operator. More... | |
void | configure (ICLTensor *input, ICLTensor *output, int axis, float epsilon=1e-12f) |
Set the input and output tensors. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, int axis, float epsilon=1e-12f) |
Set the input and output tensors. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
![]() | |
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, int axis, float epsilon=1e-12f) |
Static function to check if given info will lead to a valid configuration of CLL2NormalizeLayer. More... | |
Basic function to perform a L2 normalization on a given axis.
This function runs the following kernels:
Definition at line 50 of file CLL2NormalizeLayer.h.
CLL2NormalizeLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Constructor.
Definition at line 45 of file CLL2NormalizeLayer.cpp.
|
default |
Default Destructor.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
ICLTensor * | output, | ||
int | axis, | ||
float | epsilon = 1e-12f |
||
) |
Set the input and output tensors.
[in] | compile_context | The compile context to be used. |
[in] | input | Source tensor. Data types supported: F16/F32. Data layouts supported: NCHW/NHWC. |
[out] | output | Destination tensor. Data types and data layouts supported: Same as input . |
[in] | axis | Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 |
[in] | epsilon | (Optional) Lower bound value for the normalization. |
Definition at line 60 of file CLL2NormalizeLayer.cpp.
References CLTensorAllocator::allocate(), CLTensor::allocator(), ARM_COMPUTE_LOG_PARAMS, CLReductionOperation::configure(), arm_compute::quantization::epsilon, ITensorAllocator::init(), arm_compute::test::validation::input, MemoryGroup::manage(), arm_compute::SUM_SQUARE, and arm_compute::wrap_around().
Set the input and output tensors.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
F16 | F16 |
F32 | F32 |
[in] | input | Source tensor. Data types supported: F16/F32. Data layouts supported: NCHW/NHWC. |
[out] | output | Destination tensor. Data types and data layouts supported: Same as input . |
[in] | axis | Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 |
[in] | epsilon | (Optional) Lower bound value for the normalization. |
Definition at line 55 of file CLL2NormalizeLayer.cpp.
References arm_compute::quantization::epsilon, CLKernelLibrary::get(), and arm_compute::test::validation::input.
|
default |
Default move assignment operator.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 100 of file CLL2NormalizeLayer.cpp.
References CLScheduler::enqueue(), CLScheduler::get(), and CLReductionOperation::run().
|
static |
Static function to check if given info will lead to a valid configuration of CLL2NormalizeLayer.
[in] | input | Source tensor info. Data types supported: F16/F32. Data layouts supported: NCHW/NHWC. |
[in] | output | Destination tensor info. Data types and data layouts supported: Same as input . |
[in] | axis | Axis along which to reduce. Negative values wrap around. Maximum supported actual reduction axis : 2 |
[in] | epsilon | (Optional) Lower bound value for the normalization. |
Definition at line 79 of file CLL2NormalizeLayer.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::quantization::epsilon, arm_compute::test::validation::input, TensorInfo::set_data_type(), TensorInfo::set_tensor_shape(), arm_compute::test::validation::shape, arm_compute::SUM_SQUARE, CLL2NormalizeLayerKernel::validate(), CLReductionOperation::validate(), and arm_compute::wrap_around().