Contents

categoricalCrossEntropy(reductionType:labelSmoothing:classCount:weights:)

Creates a categorical cross entropy loss layer with the reduction type, label smoothing, number of classes, and weights you specify.

Declaration

class func categoricalCrossEntropy(reductionType: MLCReductionType, labelSmoothing: Float, classCount: Int, weights: MLCTensor?) -> Self

Parameters

  • reductionType:

    The reduction operation type.

  • labelSmoothing:

    Label smoothing value.

  • classCount:

    The number of classes.

  • weights:

    The loss label weights tensor.

Return Value

A categorical cross entropy loss layer.

See Also

Creating Loss Layers with Tensor Weights