composer.loss#

A collection of custom loss functions and loss function related utilities.

Functions

binary_cross_entropy_with_logits

Replacement for binary_cross_entropy_with_logits that handles class indices or one-hot labels.

soft_cross_entropy

Drop-in replacement for cross_entropy that handles class indices or one-hot labels.

Classes

DiceLoss

Criterion that computes the dice loss between input and target.