[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Computes the group normalization result out, mean value meanOut, reciprocal rstdOut of the standard deviation, and Swish output of the input x.
  • 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:

      {yOut=xE[x]Var[x]+epsγ+βmeanOut=E[x]rstdOut=1Var[x]+eps\left\{ \begin{array} {rcl} yOut& &= \frac{x - E[x]}{\sqrt{Var[x] + eps}} * \gamma + \beta \\ meanOut& &= E[x]\\ rstdOut& &= \frac{1}{\sqrt{Var[x] + eps}}\\ \end{array} \right.
    • Swish:

      yOut=x1+escalexyOut = \frac{x}{1+e^{-scale * x}}

      When activateSwish is set to True, Swish is computed. In this case, x in the Swish formula is out obtained by using the GroupNorm formula.

[object Object]

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

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

    [object Object]
  • 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 computation
    • aclnnGroupNormSwish defaults to a deterministic implementation.
[object Object]

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

[object Object]