ONE - On-device Neural Engine
Loading...
Searching...
No Matches
arm_compute::CLInstanceNormalizationLayerEx Class Reference

#include <CLInstanceNormalizationLayerEx.h>

Collaboration diagram for arm_compute::CLInstanceNormalizationLayerEx:

Public Member Functions

 CLInstanceNormalizationLayerEx ()
 
void configure (ICLTensor *input, ICLTensor *output, ICLTensor *gamma=nullptr, ICLTensor *beta=nullptr, float epsilon=1e-12f)
 

Static Public Member Functions

static Status validate (const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *gamma=nullptr, const ITensorInfo *beta=nullptr, float epsilon=1e-12f)
 

Detailed Description

Basic function to perform a Instance normalization.

This function runs the following kernels:

  1. CLInstanceNormalizationLayerKernelEx

Definition at line 58 of file CLInstanceNormalizationLayerEx.h.

Constructor & Destructor Documentation

◆ CLInstanceNormalizationLayerEx()

arm_compute::CLInstanceNormalizationLayerEx::CLInstanceNormalizationLayerEx ( )

Default constructor

Definition at line 48 of file CLInstanceNormalizationLayerEx.cpp.

48{}

Member Function Documentation

◆ configure()

void arm_compute::CLInstanceNormalizationLayerEx::configure ( ICLTensor *  input,
ICLTensor *  output,
ICLTensor *  gamma = nullptr,
ICLTensor *  beta = nullptr,
float  epsilon = 1e-12f 
)

Set the input and output tensors.

Parameters
[in,out]inputSource 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]outputDestination tensor. Data types and data layouts supported: same as input.
[in]gamma(Optional) The scale tensor applied to the normalized tensor. Defaults to nullptr
[in]beta(Optional) The offset tensor applied to the normalized tensor. Defaults to nullptr
[in]epsilon(Optional) Lower bound value for the normalization. Defaults to 1e-12

Definition at line 50 of file CLInstanceNormalizationLayerEx.cpp.

52{
53 auto k = std::make_unique<CLInstanceNormalizationLayerKernelEx>();
54 k->configure(input, output, gamma, beta, epsilon);
55 _kernel = std::move(k);
56}

◆ validate()

Status arm_compute::CLInstanceNormalizationLayerEx::validate ( const ITensorInfo *  input,
const ITensorInfo *  output,
const ITensorInfo *  gamma = nullptr,
const ITensorInfo *  beta = nullptr,
float  epsilon = 1e-12f 
)
static

Static function to check if given info will lead to a valid configuration of CLInstanceNormalizationLayerEx.

Parameters
[in]inputSource tensor info. Data types supported: F16/F32. Data layout supported: NHWC, NCHW
[in]outputDestination tensor info. Data types and data layouts supported: same as input.
[in]gamma(Optional) The scale tensor applied to the normalized tensor. Defaults to nullptr
[in]beta(Optional) The offset tensor applied to the normalized tensor. Defaults to nullptr
[in]epsilon(Optional) Lower bound value for the normalization. Defaults to 1e-12
Returns
a status

Definition at line 58 of file CLInstanceNormalizationLayerEx.cpp.

61{
62 return CLInstanceNormalizationLayerKernelEx::validate(input, output, gamma, beta, epsilon);
63}
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *gamma=nullptr, const ITensorInfo *beta=nullptr, float epsilon=1e-12f)

References arm_compute::CLInstanceNormalizationLayerKernelEx::validate().


The documentation for this class was generated from the following files: