cosineDistance(reductionType:weights:)
Creates a cosine distance loss layer with the reduction type and weights you specify.
Declaration
class func cosineDistance(reductionType: MLCReductionType, weights: MLCTensor?) -> SelfParameters
- reductionType:
The reduction operation type.
- weights:
The loss label weights tensor.
Return Value
A cosine distance loss layer.
See Also
Creating Loss Layers with Tensor Weights
softmaxCrossEntropy(reductionType:labelSmoothing:classCount:weights:)categoricalCrossEntropy(reductionType:labelSmoothing:classCount:weights:)sigmoidCrossEntropy(reductionType:labelSmoothing:weights:)log(reductionType:epsilon:weights:)huberLoss(reductionType:delta:weights:)meanAbsoluteError(reductionType:weights:)meanSquaredError(reductionType:weights:)hingeLoss(reductionType:weights:)