SoftmaxCrossEntropyLoss#

SoftmaxCrossEntropyLoss - 12#

Version

This version of the operator has been available since version 12.

Summary

Attributes

  • ignore_index - INT : Specifies a target value that is ignored and does not contribute to the input gradient. It’s an optional value.

  • reduction - STRING : Type of reduction to apply to loss: none, sum, mean(default). ‘none’: no reduction will be applied, ‘sum’: the output will be summed. ‘mean’: the sum of the output will be divided by the number of elements in the output.

Inputs

Between 2 and 3 inputs.

  • scores (heterogeneous) - T:

  • labels (heterogeneous) - Tind:

  • weights (optional, heterogeneous) - T:

Outputs

Between 1 and 2 outputs.

  • output (heterogeneous) - T:

  • log_prob (optional, heterogeneous) - T:

Type Constraints

  • T in ( tensor(double), tensor(float), tensor(float16) ): Constrain input and output types to float tensors.

  • Tind in ( tensor(int32), tensor(int64) ): Constrain target to integer types