LibMTL.weighting.abstract_weighting

class AbsWeighting[source]

Bases: torch.nn.Module

An abstract class for weighting strategies.

init_param(self)[source]

Define and initialize some trainable parameters required by specific weighting methods.

property backward(self, losses, **kwargs)[source]
Parameters
  • losses (list) – A list of losses of each task.

  • kwargs (dict) – A dictionary of hyperparameters of weighting methods.