[object Object][object Object][object Object]undefined
[object Object]
  • Description: Performs backpropagation of softmax, and scales and masks the result.
  • Formula:out=gradOutputoutputsum(gradOutputoutput)outputout={outscale, mask is 0 0, mask is 1 out = gradOutput \cdot output - sum(gradOutput \cdot output)\cdot output \\ out = \begin{cases} out * scale, &\text { mask is 0 } \\ 0, &\text { mask is 1 } \end{cases}
[object Object]

Each operator has calls. First, aclnnScaledMaskedSoftmaxBackwardGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnScaledMaskedSoftmaxBackward 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

    • The aclnnScaledMaskedSoftmaxBackward function is implemented in non-deterministic mode by default. You can enable deterministic mode by calling aclrtCtxSetSysParamOpt.
  • The range of the last axis S2 is (0, 4096].

  • The first two dimensions in the shape of mask are different from those of gradOutput and y, but the must be met.

[object Object]

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

[object Object]