Dual Loss Interface#
Module for the Loss Interface.
- class DualLossInterface(size_average=None, reduce=None, reduction: str = 'mean')[source]#
Bases:
_LossAbstract 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:
input (torch.Tensor) – The input tensor.
target (torch.Tensor) – The target tensor.
- Returns:
The computed loss.
- Return type: