dacapo.experiments.tasks.losses.loss
Module Contents
Classes
Helper class that provides a standard way to create an ABC using |
- class dacapo.experiments.tasks.losses.loss.Loss
Helper class that provides a standard way to create an ABC using inheritance.
- abstract compute(prediction: torch.Tensor, target: torch.Tensor, weight: torch.Tensor | None = None) torch.Tensor
Compute the loss for the given prediction and target. Optionally, if given, a loss weight should be considered.
All arguments are
torchtensors. The return type should be atorchscalar that can be used with an optimizer, just as usual when training withtorch.