dgs.models.loss.loss.CrossEntropyLoss.forward

CrossEntropyLoss.forward(inputs: torch.Tensor, targets: torch.Tensor) torch.Tensor[source]

Given predictions of shape [B x nof_classes] and targets of shape [B] compute and return the CrossEntropyLoss.