init(type:reductionType:weight:)
Creates a loss descriptor with the loss function, reduction type, and weight you specify.
Declaration
convenience init(type lossType: MLCLossType, reductionType: MLCReductionType, weight: Float)Parameters
- lossType:
The loss function type.
- reductionType:
The reduction operation type.
- weight:
A scalar floating-point weight value.