softmaxCrossEntropy(reductionType:labelSmoothing:classCount:weights:)
Creates a softmax cross entropy loss layer with the reduction type, label smoothing, number of classes, and weights you specify.
Declaration
class func softmaxCrossEntropy(reductionType: MLCReductionType, labelSmoothing: Float, classCount: Int, weights: MLCTensor?) -> SelfParameters
- reductionType:
The reduction operation type.
- labelSmoothing:
Label smoothing value.
- classCount:
The number of classes.
- weights:
The loss label weights tensor.
Return Value
A softmax cross entropy loss layer.
See Also
Creating Loss Layers with Tensor Weights
categoricalCrossEntropy(reductionType:labelSmoothing:classCount:weights:)sigmoidCrossEntropy(reductionType:labelSmoothing:weights:)log(reductionType:epsilon:weights:)huberLoss(reductionType:delta:weights:)meanAbsoluteError(reductionType:weights:)meanSquaredError(reductionType:weights:)hingeLoss(reductionType:weights:)cosineDistance(reductionType:weights:)