TorchLean API

NN.Examples.Models.Operators.ComplexRegression

Learning a complex affine map from a real loss #

Fit z ↦ (2-i)*z + (1/2+3i/4) at four points on the unit circle. The model, parameters, predictions, and checkpoint remain complex; only the squared-residual objective is real. autograd.complex.grad differentiates both coordinates and nn.sgdStep updates them together. This small example uses the coordinate-forward reference algorithm, not a complex reverse engine.

An ordinary linear builder, evaluated with complex scalar arithmetic.

Instances For

    Half the mean squared complex residual, returned in the real component type.

    Instances For

      Train both complex components, optionally persisting the exact final state.

      Instances For

        Run with an optional step count and checkpoint path.

        Instances For