[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: aclnnCelu applies the Continuously Differentiable Exponential Linear Unit (CELU) function for each element x in the input tensor self, and stores the obtained result in out. aclnnInplaceCelu applies the CELU function for each element x in the input tensor selfRef, and stores the obtained result in selfRef.

  • Formula:

CELU(x)=max(0,x)+min(0,α(exp(x/α)1))CELU(x) = max(0, x) + min(0, \alpha \ast (exp(x / \alpha) - 1)) [object Object]
  • aclnnCelu and aclnnInplaceCelu implement the same function in different ways. Select a proper operator based on your requirements.

    • aclnnCelu: An output tensor object needs to be created to store the computation result.
    • aclnnInplaceCelu: 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, aclnnCeluGetWorkspaceSize or aclnnInplaceCeluGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnCelu or aclnnInplaceCelu is called to perform computation.

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

    [object Object]
    • [object Object]Atlas training products[object Object]: The data type can be FLOAT or FLOAT16.
  • 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]
    • [object Object]Atlas training products[object Object]: The data type can be FLOAT or FLOAT16.
  • 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:
    • aclnnCelu&aclnnInplaceCelu defaults to a deterministic implementation.
[object Object]

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

aclnnCelu sample code:

[object Object]

aclnnInplaceCelu sample code:

[object Object]