21.02
|
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... | |
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, 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 43 of file CLL2NormalizeLayer.cpp.
References CLL2NormalizeLayer::~CLL2NormalizeLayer().
|
default |
Default Destructor.
Referenced by CLL2NormalizeLayer::CLL2NormalizeLayer().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Default move constructor.
Set the input and output tensors.
[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 53 of file CLL2NormalizeLayer.cpp.
References CLKernelLibrary::get().
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 58 of file CLL2NormalizeLayer.cpp.
References CLTensorAllocator::allocate(), CLTensor::allocator(), CLReductionOperation::configure(), ITensorAllocator::init(), MemoryGroup::manage(), arm_compute::SUM_SQUARE, and arm_compute::wrap_around().
|
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 Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 96 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 75 of file CLL2NormalizeLayer.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, ITensorInfo::data_type(), TensorInfo::set_data_type(), ITensorInfo::set_tensor_shape(), arm_compute::test::validation::shape, arm_compute::SUM_SQUARE, ITensorInfo::tensor_shape(), CLL2NormalizeLayerKernel::validate(), CLReductionOperation::validate(), and arm_compute::wrap_around().
Referenced by arm_compute::test::validation::DATA_TEST_CASE().