[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Normalizes a batch of data. The statistical result of the generated data after normalization is 0 (mean value) or 1 (standard deviation).

  • Formula:

    y=(xE(x))Var(x)+epsweight+biasy = \frac{(x - E(x))}{\sqrt{Var(x) + eps}} * weight + bias

    E(x) indicates the mean value and Var(x) indicates the variance, which need to be computed in the operator. ε indicates an extremely small floating point number to prevent the denominator from being 0.

[object Object]

Each operator has calls. First, aclnnBatchNormGetWorkspaceSize is called to obtain the input parameters and compute the required workspace size based on the process. Then, aclnnBatchNorm is called to perform computation.

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

    [object Object]
    • [object Object]Atlas training products[object Object] and [object Object]Atlas inference products[object Object]:
      • The data types of the [object Object], [object Object], [object Object], [object Object], [object Object], [object Object], [object Object], and [object Object] parameters cannot be BFLOAT16.
      • The data formats of the [object Object] and [object Object] parameters cannot be NHWC or NDHWC.
      • The [object Object] parameter indicates the variance of the input.
    • [object Object]Atlas A2 training products/Atlas A2 inference products[object Object] and [object Object]Atlas A3 training products/Atlas A3 inference products[object Object]:
      • The data formats of the <idp:inline displayname="code" id="code15528103664517">input[object Object] and <idp:inline displayname="code" id="code11528183617451">output[object Object] parameters cannot be NHWC or NDHWC.
      • The [object Object] parameter indicates the variance of the input.
    • Ascend 950PR/Ascend 950DT: The [object Object] parameter indicates the reciprocal of the standard deviation of the input.
  • 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 compute:
    • aclnnBatchNorm defaults to a non-deterministic implementation. You can call aclrtCtxSetSysParamOpt to enable deterministic compute.
[object Object]

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

[object Object]