[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Computes the backward pass of (high-performance version) to obtain the gradient of the input tensor for model parameter updates.

  • Formula:

    • When training is true:

      gradInput=weightnsaveVar+eps(ngradOuti=0mgradOutxsaveMeansaveVar+epsi=0m(gradOutxsaveMeansaveVar+eps))gradInput = \frac{weight}{ n{\sqrt{saveVar + eps}} }(n * gradOut - \sum^m_{i=0}{gradOut} - \frac{x-saveMean}{ {\sqrt{saveVar + eps}} }\sum^m_{i=0}({gradOut} *\frac{x-saveMean}{ {\sqrt{saveVar + eps}} } )) gradWeight=i=0m[gradOut(xsaveMean)]1saveVar+epsgradWeight = \sum^m_{i=0}[{gradOut} * (x - saveMean)] * \frac{1}{ {\sqrt{saveVar + eps}} } gradBias=i=0mgradOutgradBias = \sum^m_{i=0}{gradOut}
    • When training is false:

      gradInput=gradOut1runningVar+epsweightgradInput = gradOut * \frac{1}{ {\sqrt{runningVar + eps}} } * weight gradWeight=i=0m[gradOut(xrunningMean)]1runningVar+epsgradWeight = \sum^m_{i=0}[{gradOut} * (x - runningMean)] * \frac{1}{ {\sqrt{runningVar + eps}} } gradBias=i=0mgradOutgradBias = \sum^m_{i=0}{gradOut}
[object Object]

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

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

    [object Object]
    • [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 types of [object Object], [object Object], [object Object], [object Object], [object Object], [object Object], and [object Object] must be the same as that of [object Object].
  • Return Value

    [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]
  • Return Value

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

[object Object]
  • Deterministic computation:
    • aclnnFastBatchNormBackward defaults to a deterministic implementation.
[object Object]

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

[object Object]