[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Performs backpropagation of . It is used to compute the gradient of the Swish activation function.

  • Formula:

    • Swish function formula
    s(x)=xσ(βx)s(x) = x*\sigma(\beta x)
    • Derivative implementation of the Swish function formula
    s(x)=βs(x)+σ(βx)(1βs(x))=σ(βx)(1+βx(1σ(βx)))s^\prime(x)= \beta s(x)+\sigma(\beta x)(1-\beta s(x))= \sigma(\beta x)*(1+\beta x(1-\sigma(\beta x))) gradInput=gradOutputs(x)gradInput = gradOutput * s^\prime(x) σ(x)=11+ex\sigma(x) = {\frac{1} {1+{e}^{-x}}}

    σ(x)\sigma(x) is the Sigmoid function, s(x)s(x) is the Swish function, and s(x)s^\prime(x) is the derivative of the Swish function.

[object Object]

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

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

    [object Object]
    • [object Object]Atlas inference products[object Object] and [object Object]Atlas training products[object Object]: The data type cannot be BFLOAT16.
  • 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:
    • aclnnSwishBackward defaults to a deterministic implementation.
[object Object]

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

[object Object]