ScalarPNorm¶
Source: models/common/ScalarPNorm.py
Weighted \(p\)-norm of an arbitrary number of Scalar inputs:
\(y = (\sum_i w_i |x_i|^p + \varepsilon)^{1/p}\). The weights default
to 1 (giving the standard \(p\)-norm) and can be set per-input via the
weights option, mirroring LinearCombination. The dtype-aware
regularizer \(\varepsilon\) comes from neml2::machine_precision().
Inputs¶
from—input·Scalar· requiredScalar variables to be combined
Outputs¶
to—output·Scalar· requiredThe weighted p-norm output
Parameters¶
exponent—parameter·Scalar· requiredThe exponent
weights—parameter·Scalar· default1Per-input weights. List length must be 1 or
from-length; a single value is broadcast to all inputs.