Dual Loss Interface#

Module for the Loss Interface.

class DualLossInterface(size_average=None, reduce=None, reduction: str = 'mean')[source]#

Bases: _Loss

Abstract interface for all losses requiring both an input and a target tensor.

Initialize internal Module state, shared by both nn.Module and ScriptModule.

abstract forward(input, target)[source]#

Forward method of the loss function.

Parameters:
Returns:

The computed loss.

Return type:

torch.Tensor