24.02.1
|
Basic function to perform a Instance normalization. More...
#include <NEInstanceNormalizationLayer.h>
Public Member Functions | |
NEInstanceNormalizationLayer (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Constructor. More... | |
NEInstanceNormalizationLayer (const NEInstanceNormalizationLayer &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEInstanceNormalizationLayer & | operator= (const NEInstanceNormalizationLayer &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
NEInstanceNormalizationLayer (NEInstanceNormalizationLayer &&)=delete | |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
NEInstanceNormalizationLayer & | operator= (NEInstanceNormalizationLayer &&)=delete |
Prevent instances of this class from being moved (As this class contains non movable objects) More... | |
~NEInstanceNormalizationLayer () | |
Default destructor. More... | |
void | configure (ITensor *input, ITensor *output, float gamma=1.0f, float beta=0.0f, 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, float gamma=1.0f, float beta=0.0f, float epsilon=1e-12f) |
Static function to check if given info will lead to a valid configuration of NEInstanceNormalizationLayer. More... | |
Basic function to perform a Instance normalization.
This function runs the following kernels:
Definition at line 46 of file NEInstanceNormalizationLayer.h.
NEInstanceNormalizationLayer | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Constructor.
Definition at line 37 of file NEInstanceNormalizationLayer.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 | ( | ITensor * | input, |
ITensor * | output, | ||
float | gamma = 1.0f , |
||
float | beta = 0.0f , |
||
float | epsilon = 1e-12f |
||
) |
Set the input and output tensors.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
F16 | F16 |
F32 | F32 |
[in,out] | input | Source tensor. In case of output tensor = nullptr this tensor will store the result of the normalization. Data types supported: F16/F32. Data layout supported: NHWC, NCHW |
[out] | output | Destination tensor. Data types and data layouts supported: same as input . |
[in] | gamma | (Optional) The scale scalar value applied to the normalized tensor. Defaults to 1.0 |
[in] | beta | (Optional) The offset scalar value applied to the normalized tensor. Defaults to 0.0 |
[in] | epsilon | (Optional) Lower bound value for the normalization. Defaults to 1e-12 |
Definition at line 48 of file NEInstanceNormalizationLayer.cpp.
References TensorAllocator::allocate(), Tensor::allocator(), ARM_COMPUTE_LOG_PARAMS, NEPermute::configure(), arm_compute::cpu::data_layout, arm_compute::quantization::epsilon, Tensor::info(), arm_compute::test::validation::input, MemoryGroup::manage(), arm_compute::NCHW, ITensorInfo::set_data_layout(), and arm_compute::utils::cast::U.
|
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 90 of file NEInstanceNormalizationLayer.cpp.
References Window::DimZ, Scheduler::get(), NEPermute::run(), and IScheduler::schedule().
|
static |
Static function to check if given info will lead to a valid configuration of NEInstanceNormalizationLayer.
[in] | input | Source tensor info. Data types supported: F16/F32. Data layout supported: NHWC, NCHW |
[in] | output | Destination tensor info. Data types and data layouts supported: same as input . |
[in] | gamma | (Optional) The scale scalar value applied to the normalized tensor. Defaults to 1.0 |
[in] | beta | (Optional) The offset scalar value applied to the normalized tensor. Defaults to 0.0 |
[in] | epsilon | (Optional) Lower bound value for the normalization. Defaults to 1e-12 |
Definition at line 82 of file NEInstanceNormalizationLayer.cpp.
References ICloneable< T >::clone(), arm_compute::test::validation::input, arm_compute::NCHW, and NEInstanceNormalizationLayerKernel::validate().