[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Computes the group normalization result groupnormOut, mean value meanOut, and reciprocal rstdOut of the standard deviation of the input self, and perform the SiLU operation on groupnormOut to obtain the final output out.
  • Formula:
    • GroupNorm: Assume E[x]=xˉE[x] = \bar{x} indicates the mean value of xx, and Var[x]=1ni=1n(xiE[x])2Var[x] = \frac{1}{n} * \sum_{i=1}^n(x_i - E[x])^2 indicates the variance of xx. Then:{groupnormOut=xE[x]Var[x]+epsγ+βmeanOut=E[x]rstdOut=1Var[x]+eps\left\{ \begin{array} {rcl} groupnormOut& &= \frac{x - E[x]}{\sqrt{Var[x] + eps}} * \gamma + \beta \\ meanOut& &= E[x]\\ rstdOut& &= \frac{1}{\sqrt{Var[x] + eps}}\\ \end{array} \right.
    • Silu:out=groupnormOut1+egroupnormOutout = \frac{groupnormOut}{1+e^{-groupnormOut}}
[object Object]

Each operator has calls. First, aclnnGroupNormSiluGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnGroupNormSilu is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters

    [object Object]
    • [object Object]Atlas inference products[object Object]: The data type BFLOAT16 is not supported.

    • 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 verification. The following errors may be thrown.

    [object Object]
[object Object]
  • Parameters

    [object Object]
  • Returns

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic computing: The aclnnGroupNormSilu is implemented in deterministic mode by default.

  • Input shape restrictions:

    1. The size of the second dimension of self must be exactly divided by group.
    2. 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

[object Object]

The following example is for reference only. For details, see .

[object Object]