LibMTL.weighting.GradDrop

class GradDrop[source]

Bases: LibMTL.weighting.abstract_weighting.AbsWeighting

Gradient Sign Dropout (GradDrop).

This method is proposed in Just Pick a Sign: Optimizing Deep Multitask Models with Gradient Sign Dropout (NeurIPS 2020) and implemented by us.

Parameters

leak (float, default=0.0) – The leak parameter for the weighting matrix.

Warning

GradDrop is not supported by parameter gradients, i.e., rep_grad must be True.

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

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