[object Object]

[object Object][object Object]undefined
[object Object]
  • Function: performs backpropagation of the negative log likelihood loss function.
  • Formula:
    • reduction=mean:

      x_gradtarget(t)={(gradOutputw(target(t)))/totalweight,target(t)=10,target(t)=0x\_grad_{target(t)} =\begin{cases} (-gradOutput * w_{(target(t))}) / totalweight &, target(t)=1 \\ 0 &, target(t)=0 \end{cases}
    • reduction=sum:

      x_gradtarget(t)={gradOutputw(target(t)),target(t)=10,target(t)=0x\_grad_{target(t)} =\begin{cases} -gradOutput * w_{(target(t))} &, target(t)=1 \\ 0 &, target(t)=0 \end{cases}
    • reduction=none:

      x_gradtarget(t)={gradOutputtw(target(t)),target(t)=10,target(t)=0x\_grad_{target(t)} =\begin{cases} -gradOutput_t * w_{(target(t))} &, target(t)=1 \\ 0 &, target(t)=0 \end{cases}
[object Object]

Each operator has calls. First, aclnnNLLLossBackwardGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnNLLLossBackward 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 compute:
    • aclnnNLLLossBackward defaults to a deterministic implementation.
[object Object]

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

[object Object]