Contents

init(type:reductionType:weight:labelSmoothing:classCount:)

Creates a loss descriptor with the loss function, reduction type, weight, label smoothing, and number of classes you specify.

Declaration

convenience init(type lossType: MLCLossType, reductionType: MLCReductionType, weight: Float, labelSmoothing: Float, classCount: Int)

Parameters

  • lossType:

    The loss function type.

  • reductionType:

    The reduction operation type.

  • weight:

    A scalar floating-point weight value.

  • labelSmoothing:

    The value for label smoothing.

  • classCount:

    The number of classes.

See Also

Creating Loss Descriptors