A Fourier activation (FAct) writes the nonlinearity as φ(t) = a0 + ∑k=1..K [ ak cos(kωt) + bk sin(kωt) ]. Before training begins the coefficients are not random: they are the exact Fourier coefficients of GELU on the interval [−π/ω, π/ω], obtained by numerical integration of the Euler formulas. Move the two sliders to see how the number of harmonics K and the base frequency ω decide how faithful that starting approximation is.
Fitted coefficients (the values the network is initialised with):
| k | ak (cos) | bk (sin) |
|---|