LpLoss#

Module for Loss class

class LossInterface(reduction='mean')[source]#

Bases: _Loss

The abstract LossInterface class. All the class defining a PINA Loss should be inheritied from this class.

Parameters:

reduction (str) – Specifies the reduction to apply to the output: none | mean | sum. When none: no reduction will be applied, mean: the sum of the output will be divided by the number of elements in the output, sum: the output will be summed. Note: size_average and reduce are in the process of being deprecated, and in the meantime, specifying either of those two args will override reduction. Default: mean.

abstract forward(input, target)[source]#

Forward method for loss function.

Parameters:
Returns:

Loss evaluation.

Return type:

torch.Tensor