init(type:reductionType:weight:labelSmoothing:classCount:epsilon:delta:)
Creates a loss descriptor with the loss function, reduction type, weight, label smoothing, and number of classes, epsilon, and delta that you specify.
Declaration
convenience init(type lossType: MLCLossType, reductionType: MLCReductionType, weight: Float, labelSmoothing: Float, classCount: Int, epsilon: Float, delta: Float)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.
- epsilon:
The epsilon used by LogLoss.
- delta:
The delta used by Huber loss.