Layers¤
Low-level model building blocks.
Note
Key notes:
Linearsupports Random Weight Factorization (RWF) and optional complex parameters.
phydrax.nn.Linear
¤
Affine layer with optional activation.
Computes
\[
y=\phi(Wx+b),
\]
where \(\phi\) is activation (or the identity). If Random Weight
Factorization (RWF) is enabled, parameters are represented as an
unscaled weight matrix \(V\) and per-output log-scales \(s\), and the layer
applies
\[
y=\phi\!\left(\operatorname{diag}(e^s)\,Vx + b\right).
\]
If enforce_positive_weights=True, weights are constrained via
\(W=\operatorname{softplus}(W_\text{raw})\).