composer.models.loss.soft_cross_entropy
- composer.models.loss.soft_cross_entropy(input: Tensor, target: Tensor, weight: Optional[Tensor] = None, size_average: Optional[bool] = None, ignore_index: int = - 100, reduce: Optional[bool] = None, reduction: str = 'mean')[source]
Drop-in replacement for
torch.CrossEntropy
that can handle dense labels.This function will be obsolete with this update.