Contents

BNNSLossFunctionCosineDistance

Performs cosine distance loss computation between input predictions and labels.

Declaration

var BNNSLossFunctionCosineDistance: BNNSLossFunction { get }

Discussion

BNNSLossFunctionCosineDistance performs cosine distance loss computation between labels and predictions.

You must unit-normalize both labels and predictions before calculating loss.

You can scale the loss with either a scalar value or weight matrix, and reduce the loss according to a reduction function.

See Also

Loss Functions