24.02.1
|
Basic function to compute a normalization layer. More...
#include <NENormalizationLayer.h>
Public Member Functions | |
NENormalizationLayer (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Default constructor. More... | |
NENormalizationLayer (const NENormalizationLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NENormalizationLayer & | operator= (const NENormalizationLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NENormalizationLayer (NENormalizationLayer &&)=delete | |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
NENormalizationLayer & | operator= (NENormalizationLayer &&)=delete |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
~NENormalizationLayer () | |
Default destructor. More... | |
void | configure (const ITensor *input, ITensor *output, const NormalizationLayerInfo &norm_info) |
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, const NormalizationLayerInfo &norm_info) |
Static function to check if given info will lead to a valid configuration of NENormalizationLayer. More... | |
Basic function to compute a normalization layer.
This function calls the following kernels:
Definition at line 48 of file NENormalizationLayer.h.
NENormalizationLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Default constructor.
Definition at line 40 of file NENormalizationLayer.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.
void configure | ( | const ITensor * | input, |
ITensor * | output, | ||
const NormalizationLayerInfo & | norm_info | ||
) |
Set the input and output tensors.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
F32 | F32 |
F16 | F16 |
[in] | input | Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM], and an optional 4th dimension for batch of inputs. Data type supported: F16/F32. Data layouts supported: NCHW/NHWC. |
[out] | output | Destination with the same dimensions, data type, data layout and number of channels of input |
[in] | norm_info | Normalization layer information like the normalization type, normalization size and other parameters. |
Definition at line 45 of file NENormalizationLayer.cpp.
References TensorAllocator::allocate(), Tensor::allocator(), ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_LOG_PARAMS, NEPixelWiseMultiplication::configure(), TensorAllocator::init(), arm_compute::test::validation::input, MemoryGroup::manage(), arm_compute::SATURATE, tensor_info, and arm_compute::TO_ZERO.
Referenced by arm_compute::test::validation::TEST_CASE().
|
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 CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 79 of file NENormalizationLayer.cpp.
References Window::DimY, Scheduler::get(), NEPixelWiseMultiplication::run(), and IScheduler::schedule().
Referenced by arm_compute::test::validation::TEST_CASE().
|
static |
Static function to check if given info will lead to a valid configuration of NENormalizationLayer.
[in] | input | Source tensor. 3 lower dims represent a single input with dimensions [width, height, IFM], and an optional 4th dimension for batch of inputs. Data type supported: F16/F32. Data layouts supported: NCHW/NHWC. |
[in] | output | Destination with the same dimensions, data type, data layout and number of channels of input |
[in] | norm_info | Normalization layer information like the normalization type, normalization size and other parameters. |
Definition at line 65 of file NENormalizationLayer.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON_NULLPTR, ARM_COMPUTE_RETURN_ON_ERROR, arm_compute::test::validation::input, arm_compute::SATURATE, arm_compute::TO_ZERO, NENormalizationLayerKernel::validate(), and NEPixelWiseMultiplication::validate().