API Reference

LossFunction

class monad.types.LossFunction

A 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)


Parameters

model_output: torch.Tensor


target: torch.Tensor


weight: Optional[torch.Tensor]
Default_value: None