21.02
|
Basic function to perform a Instance normalization. More...
#include <CLInstanceNormalizationLayer.h>
Public Member Functions | |
CLInstanceNormalizationLayer () | |
Default constructor. More... | |
void | configure (ICLTensor *input, ICLTensor *output, float gamma=1.0f, float beta=0.0f, float epsilon=1e-12f, bool use_mixed_precision=true) |
Set the input and output tensors. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, ICLTensor *output, float gamma=1.0f, float beta=0.0f, float epsilon=1e-12f, bool use_mixed_precision=true) |
Set the input and output tensors. More... | |
Public Member Functions inherited from ICLSimpleFunction | |
ICLSimpleFunction (CLRuntimeContext *ctx=nullptr) | |
Constructor. More... | |
ICLSimpleFunction (const ICLSimpleFunction &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLSimpleFunction (ICLSimpleFunction &&)=default | |
Default move constructor. More... | |
ICLSimpleFunction & | operator= (const ICLSimpleFunction &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
ICLSimpleFunction & | operator= (ICLSimpleFunction &&)=default |
Default move assignment operator. More... | |
~ICLSimpleFunction () | |
Default destructor. More... | |
void | run () override final |
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, bool use_mixed_precision=true) |
Static function to check if given info will lead to a valid configuration of CLInstanceNormalizationLayer. More... | |
Basic function to perform a Instance normalization.
This function runs the following kernels:
Definition at line 41 of file CLInstanceNormalizationLayer.h.
void configure | ( | ICLTensor * | input, |
ICLTensor * | output, | ||
float | gamma = 1.0f , |
||
float | beta = 0.0f , |
||
float | epsilon = 1e-12f , |
||
bool | use_mixed_precision = true |
||
) |
Set the input and output tensors.
[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 |
[in] | use_mixed_precision | (Optional) Use mixed precision in case of FP16 execution |
Definition at line 36 of file CLInstanceNormalizationLayer.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
ICLTensor * | output, | ||
float | gamma = 1.0f , |
||
float | beta = 0.0f , |
||
float | epsilon = 1e-12f , |
||
bool | use_mixed_precision = true |
||
) |
Set the input and output tensors.
[in] | compile_context | The compile context to be used. |
[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 |
[in] | use_mixed_precision | (Optional) Use mixed precision in case of FP16 execution |
Definition at line 41 of file CLInstanceNormalizationLayer.cpp.
|
static |
Static function to check if given info will lead to a valid configuration of CLInstanceNormalizationLayer.
[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 |
[in] | use_mixed_precision | (Optional) Use mixed precision in case of FP16 execution |
Definition at line 48 of file CLInstanceNormalizationLayer.cpp.
References CLInstanceNormalizationLayerKernel::validate().
Referenced by arm_compute::test::validation::DATA_TEST_CASE().