[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Applies the exponential linear unit (ELU) activation function to each element x in the input tensor self and stores the result in the output tensor out.
  • Formula:ELU(x)={scalex,x>0αscale(exp(xinputScale)1),x0ELU(x) = \begin{cases} scale \ast x, \quad x > 0\\ \alpha \ast scale \ast (exp(x \ast inputScale)-1), \quad x \leq 0 \end{cases}
[object Object]
  • aclnnElu and aclnnInplaceElu implement the same function. Select the appropriate operator based on actual service scenarios.

    • aclnnElu: An output tensor object must be created to store the computation result.
    • aclnnInplaceElu: No output tensor object needs to be created, and the computation result is stored in the memory of the input tensor.
  • Each operator has calls. First, aclnnEluGetWorkspaceSize or aclnnInplaceEluGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation flow. Then, aclnnElu or aclnnInplaceElu is called to perform computation.

[object Object]
[object Object]
[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]
  • 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:
    • aclnnElu and aclnnInplaceElu default to a deterministic implementation.
[object Object]

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

aclnnElu API call example:

[object Object]

aclnnInplaceElu API call example:

[object Object]