IMTL-G

class torchjd.aggregation.IMTLG[source]

Aggregator generalizing the method described in Towards Impartial Multi-task Learning. This generalization, defined formally in Jacobian Descent For Multi-Objective Optimization, supports matrices with some linearly dependant rows.

__call__(matrix, /)[source]

Computes the aggregation from the input matrix and applies all registered hooks.

Parameters:

matrix (Tensor) – The Jacobian to aggregate.

Return type:

Tensor

class torchjd.aggregation.IMTLGWeighting[source]

Weighting giving the weights of IMTLG.

__call__(gramian, /)[source]

Computes the vector of weights from the input gramian and applies all registered hooks.

Parameters:

gramian (Tensor) – The gramian from which the weights must be extracted.

Return type:

Tensor