dacapo.experiments.tasks.losses.affinities_loss
Module Contents
Classes
Helper class that provides a standard way to create an ABC using |
- class dacapo.experiments.tasks.losses.affinities_loss.AffinitiesLoss(num_affinities: int, lsds_to_affs_weight_ratio: float)
Helper class that provides a standard way to create an ABC using inheritance.
- compute(prediction, target, weight)
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.