Formula:
The backpropagation of SmoothL1Loss can be computed through derivation. For the first case of SmoothL1Loss, that is, |x – y| < 1, the derivative is:
For the second case of SmoothL1Loss, that is, |x – y| ≥ 1, the derivative is:
sign(x) represents a sign function of x, that is:
Each operator has calls. First, aclnnSmoothL1LossBackwardGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnSmoothL1LossBackward is called to perform computation.
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]
- Deterministic computation
- aclnnSmoothL1LossBackward defaults to a deterministic implementation.
The following example is for reference only. For details, see .