Description: Performs the activation function of the random rectified linear unit with noise. When the input is less than or equal to 0, the slope is a. When the input is greater than 0, the slope is 1.
Formula:
a is a random variable that follows an even distribution of (lower,upper). If the training mode (training == true) is used, the noise calculation formula is as follows:
- aclnnRReluWithNoise and aclnnInplaceRReluWithNoise implement the same function in different ways. Select a proper operator based on your requirements.
- aclnnRReluWithNoise: An output tensor object needs to be created to store the computation result.
- aclnnInplaceRReluWithNoise: 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, aclnnRReluWithNoiseGetWorkspaceSize or aclnnInplaceRReluWithNoiseGetWorkspaceSize is called to obtain input parameters and compute the required workspace size based on the computation process. Then, aclnnRReluWithNoise or aclnnInplaceRReluWithNoise is called to perform computation.
Parameters:
[object Object]- [object Object]Atlas training products[object Object]: The data type can be FLOAT16 or FLOAT.
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 FLOAT16 or FLOAT.
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:
- aclnnRReluWithNoise and aclnnInplaceRReluWithNoise default to a deterministic implementation.
The following example is for reference only. For details, see .