[object Object]

[object Object][object Object]undefined
[object Object]
  • Function: Calculates the binary classification logical loss function of the input self and target. reduction specifies the reduction to be applied to the output. The value can be none, mean, or sum. none indicates that no reduction will be applied; mean indicates that the sum of the output will be divided by the number of elements in the output; sum indicates that the output will be summed.

  • Formula:

    If reduction is set to none:

    out(self,target)=L=log(1+exp(target[i]self[i]))\text{out}(self,target)=L=log(1+\exp(-target[i]*self[i]))

    If reduction is not set to none:

out(self,target)={mean(L),if reduction=’mean’sum(L),if reduction=’sum’\text{out}(self,target)= \begin{cases} \operatorname{mean}(L),& \text{if reduction}= \text{'mean'}\\ \operatorname{sum}(L), & \text{if reduction} = \text{'sum'} \end{cases} [object Object]

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

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

[object Object]