CrossEntropyLoss
- class composer.models.loss.CrossEntropyLoss(dist_sync_on_step=False)[source]
Bases:
torchmetrics.metric.Metric
Torchmetric cross entropy loss implementation.
This class implements cross entropy loss as a torchmetric so that it can be returned by the
metric()
function inBaseMosaicModel
.