Skip to content

Loss

minnt.Loss

Bases: Protocol

An abstract loss function interface.

__call__

__call__(y: Tensor, y_true: Tensor) -> Tensor

Compute loss of the given predictions and gold targets.

Parameters:

  • y (Tensor) –

    The predicted outputs.

  • y_true (Tensor) –

    The ground-truth targets.

Returns:

  • Tensor

    A tensor representing the computed loss.