Fourier Neural Operator Model Helpers (API) #
Reusable configuration for the real-valued 1D FNO path used by the runnable Burgers example.
The public example is intentionally about data loading, training, evaluation, and plotting. The model constructor lives here so other examples can reuse the same typed FNO shape contract without copying the wiring.
def
NN.API.nn.models.fno1dReal
(cfg : Fno1dConfig)
(hModesFit : 2 * cfg.modes ≤ cfg.grid := by decide)
:
M (Sequential (fno1dInShape cfg) (fno1dOutShape cfg))
Real-valued FNO1D constructor.
The backend may later choose a dense-DFT or cuFFT-backed spectral implementation, but the model shape and parameter contract are the same from the API side.