[object Object]

[object Object][object Object]undefined
[object Object]
  • Description: Computes the softmax and cross-entropy loss and provides the backward gradient for the input logits.
  • Formula:loss=iyilog(softmax(xi))\text{loss} = - \sum_i y_i \cdot \log(\text{softmax}(x_i))
backprop=softmax(xi)yi\text{backprop} = \text{softmax}(x_i) - y_i

xix_i is the input features, and yiy_i is the input labels.

[object Object]

Each operator has calls. First, aclnnSoftmaxCrossEntropyWithLogitsGetWorkspaceSize is called to obtain the workspace size required for computation and the executor that contains the operator computation process. Then, aclnnSoftmaxCrossEntropyWithLogits is called to perform computation.

[object Object]
[object Object]
[object Object]
  • Parameters:

    [object Object]
    • [object Object]Atlas training products[object Object] and [object Object]Atlas inference products[object Object]: The data type can be FLOAT or FLOAT16.
  • 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:
    • aclnnSoftmaxCrossEntropyWithLogits defaults to a deterministic implementation.
[object Object]

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

[object Object]