- Description: Performs instance normalization. Compared with , aclnnInstanceNorm normalizes each sample instance instead of the entire batch, making this function more suitable for processing data such as images.
- Formula:
Each operator has calls. First, aclnnInstanceNormGetWorkspaceSize is called to obtain the input parameters and compute the workspace size required by the process. Then, aclnnInstanceNorm is called to perform computation.
[object Object]
[object Object]
Parameters:
[object Object]Returns:
aclnnStatus: status code. For details, see .
The first-phase API implements input parameter verification. The following errors may be thrown:
[object Object]
- Function dimensions:
- The supported data types are as follows:
- x, gamma, beta, y, mean, and variance support FLOAT32 and FLOAT16.
- The data format can be ND.
- The shape of x and y must be four-dimensional. gamma/beta must be one-dimensional and consistent with the C axis of x and y.
- The H*W size of x and y must be greater than or equal to 32 bytes, and the C axis size must also be greater than or equal to 32 bytes.
- dataFormat can only be NHWC or NCHW.
- The supported data types are as follows:
- Description of boundary value scenarios:
- When the input is Inf, the output is Inf.
- When the input is NaN, the output is NaN.
- Deterministic compute:
- aclnnInstanceNorm defaults to a deterministic implementation.
The following example is for reference only. For details, see .
[object Object]