UPGrad

class torchjd.aggregation.UPGrad(pref_vector=None, projector=None)[source]

GramianWeightedAggregator that projects each row of the input matrix onto the dual cone of all rows of this matrix, and that combines the result, as proposed in Jacobian Descent For Multi-Objective Optimization.

Parameters:
  • pref_vector (Tensor | None) – The preference vector used to combine the projected rows. If not provided, defaults to \(\begin{bmatrix} \frac{1}{m} & \dots & \frac{1}{m} \end{bmatrix}^T \in \mathbb{R}^m\).

  • projector (DualConeProjector | None) – The DualConeProjector used to compute the projection.

__call__(*args, **kwargs)[source]

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

Parameters:

matrix – The Jacobian to aggregate.

Return type:

Any

class torchjd.aggregation.UPGradWeighting(pref_vector=None, projector=None)[source]

Weighting [PSDMatrix] giving the weights of UPGrad.

Parameters:
  • pref_vector (Tensor | None) – The preference vector to use. If not provided, defaults to \(\begin{bmatrix} \frac{1}{m} & \dots & \frac{1}{m} \end{bmatrix}^T \in \mathbb{R}^m\).

  • projector (DualConeProjector | None) – The DualConeProjector used to compute the projection.

__call__(*args, **kwargs)[source]

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

Parameters:

gramian – The Gramian from which the weights must be extracted.

Return type:

Any