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:
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.
Parameters:
[object Object]- [object Object]Atlas training products[object Object]: The data type can be FLOAT or FLOAT16.
Returns:
[object Object][object Object]: status code. For details, see . The first-phase API implements input parameter verification. The following errors may be thrown:
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]
- Deterministic compute:
- aclnnCelu&aclnnInplaceCelu defaults to a deterministic implementation.
The following example is for reference only. For details, see .
aclnnCelu sample code:
aclnnInplaceCelu sample code: