Description: Computes the Logsoftmax value of the input tensor.
Formula:
During the actual calculation, the maximum value of the input is subtracted and the logarithmic difference is directly calculated to prevent overflow and underflow in floating-point operations, ensuring the stability of numerical calculation.
Each operator has calls. First, aclnnLogSoftmaxGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnLogSoftmax is called to perform computation.
Parameters:
[object Object]- [object Object]Atlas inference products[object Object] and [object Object]Atlas training products[object Object]: The data type can be FLOAT16, FLOAT32, or DOUBLE.
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:
- aclnnLogSoftmax defaults to a deterministic implementation.
The following example is for reference only. For details, see .