class monad.types.LossFunction
monad.types.LossFunctionA Protocol, it defines the interface for classes that defines loss function. Must provide a process method.
Required methods
LossFunction.__call__(self, model_output, target, weight)
LossFunction.__call__(self, model_output, target, weight)| Parameters |
|---|
model_output: torch.Tensor
target: torch.Tensor
weight: Optional[torch.Tensor]
Default_value: None
