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