dgs.models.loss.loss.CrossEntropyLoss

class dgs.models.loss.loss.CrossEntropyLoss(*args: Any, **kwargs: Any)[source]

Compute the Cross Entropy Loss after computing the LogSoftmax on the input data.

__init__(**kwargs)[source]

Methods

forward(inputs, targets)

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