ConFIG

class torchjd.aggregation.ConFIG(pref_vector=None)[source]

Aggregator as defined in Equation 2 of ConFIG: Towards Conflict-free Training of Physics Informed Neural Networks.

Parameters:

pref_vector (Tensor | None) – The preference vector used to weight the rows. If not provided, defaults to equal weights of 1.

Note

This implementation was adapted from the official implementation.

__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