[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^\prime(x)= \beta s(x)+\sigma(\beta x)(1-\beta s(x))= \sigma(\beta x)*(1+\beta x(1-\sigma(\beta x))) $$ $$

    gradInput = gradOutput * s^\prime(x)

    $$ $$ \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 series products[object Object] and [object Object]Atlas training series products[object Object]: The data type can be FLOAT16 or FLOAT.
  • Returns:

    aclnnStatus: 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:

    aclnnStatus: 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]