An n-dimensional Fourier feature network, written in Julia using Flux.jl, based on this paper.
Passing input points through a simple Fourier feature mapping enables a multilayer perceptron (MLP) to better approximate higher-frequency functions in low-dimensional problem domains, compared to an MLP receiving only the coordinates as input.