Real losses on complex parameters #
An Objective returns a real scalar while retaining complex parameter tensors. Forward-mode
seeding differentiates both coordinates, including nonholomorphic operations such as conjugation
and squared magnitude. No complex-linear reverse rule is assumed. The gradient is represented as
dL/dre + i*dL/dim; multiplying it by a real learning rate gives the ordinary Euclidean update
on the two coordinates. In the convention with a factor of one half in Wirtinger derivatives,
this is twice the conjugate Wirtinger derivative.
grad evaluates two directional passes per complex parameter entry. This reference algorithm is
useful for small models and checking specialized backward implementations, not a claim of an
efficient large-model reverse pass. Objectives must be deterministic across those evaluations.
Scalar branch conventions still apply at nonsmooth points and complex branch cuts.
A deterministic, real-valued objective on shape-indexed complex model state.
Instances For
Evaluate a real objective and its directional derivative in one forward-mode pass.
Both coordinates of direction are seeded independently; the tangent is the real scalar
pairing sum (dL/dre * direction.re + dL/dim * direction.im).
Instances For
Differentiate a real objective with respect to every complex parameter coordinate.
The returned state contains dL/dre and dL/dim, not a complex analytic derivative.
Set value := true to also return the real objective value. Empty tensors remain empty;
the value form still evaluates the objective when there are no parameters.