21.02
|
Basic function to perform a L2 normalization on a given axis. More...
#include <NEL2NormalizeLayer.h>
Public Member Functions | |
NEL2NormalizeLayer (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Constructor. More... | |
NEL2NormalizeLayer (const NEL2NormalizeLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEL2NormalizeLayer & | operator= (const NEL2NormalizeLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEL2NormalizeLayer (NEL2NormalizeLayer &&)=delete | |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
NEL2NormalizeLayer & | operator= (NEL2NormalizeLayer &&)=delete |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
~NEL2NormalizeLayer () | |
Default destructor. More... | |
void | configure (ITensor *input, ITensor *output, int axis, float epsilon=1e-6f) |
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-6f) |
Static function to check if given info will lead to a valid configuration of NEL2NormalizeLayer. More... | |
Basic function to perform a L2 normalization on a given axis.
This function runs the following kernels:
Definition at line 46 of file NEL2NormalizeLayer.h.
NEL2NormalizeLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Constructor.
Definition at line 39 of file NEL2NormalizeLayer.cpp.
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
delete |
Prevent instances of this class from being moved (As this class contains non movable objects)
|
default |
Default destructor.
Set the input and output tensors.
[in,out] | input | Source tensor. Data types supported: F16/F32. (Written to only for border_size != 0) |
[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 44 of file NEL2NormalizeLayer.cpp.
References TensorAllocator::allocate(), Tensor::allocator(), NEReductionOperation::configure(), 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)
|
delete |
Prevent instances of this class from being moved (As this class contains non movable objects)
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 80 of file NEL2NormalizeLayer.cpp.
References Window::DimY, Scheduler::get(), NEReductionOperation::run(), and IScheduler::schedule().
|
static |
Static function to check if given info will lead to a valid configuration of NEL2NormalizeLayer.
[in] | input | Source tensor info. Data types supported: F16/F32. (Written to only for border_size != 0) |
[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 59 of file NEL2NormalizeLayer.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(), NEL2NormalizeLayerKernel::validate(), NEReductionOperation::validate(), and arm_compute::wrap_around().