Abstract Weights
popinn.AbstractWeights
¤
Abstract base class for per-term loss weighting schemes.
Subclasses store the weighting parameters in values and implement the
combine method, which folds the per-term scalar residuals into the total weighted loss.
Fields:
values(dict): the weights, keyed by the set of correspondingResidualTerm.namestrings. Whether the weights are static constants or trainable leaves is decided by the concrete subclass.
Source code in src/popinn/loss.py
combine(residuals)
¤
Combine per-term scalar residuals into the weighted total.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
residuals
|
dict
|
A mapping from each |
required |
Returns:
| Type | Description |
|---|---|
jaxtyping.Float[jax.Array, '']
|
The total weighted loss. |