- Description: Computes the group normalization result out, mean value meanOut, reciprocal rstdOut of the standard deviation, and SiLU output of the input self.
- Formula:
- GroupNorm: Assume indicates the mean value of , and indicates the variance of . Then:
- Silu: If activateSilu is set to True, Silu is computed. In this case, x in the Silu formula is out obtained by using the GroupNorm formula.
Each operator has calls. First, aclnnGroupNormSiluV2GetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnGroupNormSiluV2 is called to perform computation.
Parameters
[object Object]For the [object Object]Atlas inference products[object Object], the data type BFLOAT16 is not supported.
For the Ascend 950PR/Ascend 950DT, the data types of meanOut and rstdOut must be the same as those of gamma and beta.
Returns
[object Object]: status code. For details, see .The first-phase API implements input parameter validation. The following error codes may be returned.
[object Object]
Deterministic computing: The aclnnGroupNormSiluV2 operator is implemented in deterministic mode by default.
Input shape restrictions:
- The size of the second dimension of self must be exactly divided by group.
- The shapes of meanOut and rstdOut must be (N, group), where N is the size of the first dimension of self.
Input attribute restriction: eps > 0
The following example is for reference only. For details, see .