[object Object]

[object Object][object Object]undefined
[object Object]
  • API function: Performs backpropagation of the API.

  • Formula:

    The backpropagation of SmoothL1Loss can be computed through derivation. For the first case of SmoothL1Loss, that is, |x – y| < 1, the derivative is:

    SmoothL1Loss(x,y)x=xy\frac{\partial SmoothL1Loss(x,y)}{\partial x} = x - y

    For the second case of SmoothL1Loss, that is, |x – y| ≥ 1, the derivative is:

    SmoothL1Loss(x,y)x=sign(xy)\frac{\partial SmoothL1Loss(x,y)}{\partial x} = sign(x - y)

    sign(x) represents a sign function of x, that is:

    sign(x)={1,ifx>00,ifx=01,ifx<0sign(x) =\begin{cases} 1,& if x>0 \\ 0,& if x=0 \\ -1,& if x<0 \end{cases}
[object Object]

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.

[object Object]
[object Object]
[object Object]
  • 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]
[object Object]
  • Parameters:

    [object Object]
  • Returns:

    [object Object]: status code. For details, see .

[object Object]
  • Deterministic computation
    • aclnnSmoothL1LossBackward defaults to a deterministic implementation.
[object Object]

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

[object Object]