LossInterface#

Module for the Loss Interface.

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

Bases: _Loss

Abstract base class for all losses. All classes defining a loss function should inherit from this interface.

Initialization of the LossInterface class.

Parameters:

reduction (str) – The reduction method for the loss. Available options: none, mean, sum. If none, no reduction is applied. If mean, the sum of the loss values is divided by the number of values. If sum, the loss values are summed. Default is mean.

abstract forward(input, target)[source]#

Forward method of the loss function.

Parameters: