Losses#
|
Binary Dice Loss convenience function. |
|
|
|
Computes the cosine distance between targets and predictions. |
|
Computes the cosine similarity between targets and predictions. |
|
Computes CTC loss. |
|
Computes CTC loss and CTC forward-probabilities. |
|
Computes the Dice Loss for multi-class segmentation. |
|
Computes the generalized Kullback-Leibler divergence loss. |
|
Computes the hinge loss for binary classification. |
|
Huber loss, similar to L2 loss close to zero, L1 loss away from zero. |
|
Computes the Kullback-Leibler divergence (relative entropy) loss. |
|
Computes the Kullback-Leibler divergence (relative entropy) loss. |
|
Calculates the L2 loss for a set of predictions. |
|
Calculates the log-cosh loss for a set of predictions. |
|
Creates a Fenchel-Young loss from a max function. |
|
Computes Multiclass Generalized Dice Loss with automatic class weighting. |
|
Multiclass hinge loss. |
|
Multiclass perceptron loss. |
|
Multiclass sparsemax loss. |
|
Normalized temperature scaled cross entropy loss (NT-Xent). |
|
Binary perceptron loss. |
|
Computes PolyLoss between logits and labels. |
|
Ranking softmax loss. |
|
Computes the softmax cross entropy between sets of logits and labels. |
|
Computes element-wise sigmoid cross entropy given logits and labels. |
|
Sigmoid focal loss with numerical stability improvements. |
|
Apply label smoothing. |
|
Computes the softmax cross entropy between sets of logits and labels. |
Computes softmax cross entropy between the logits and integer labels. |
|
|
Binary sparsemax loss. |
|
Calculates the squared error for a set of predictions. |
|
Returns the triplet loss for a batch of embeddings. |