SciML / OperatorLearning.jl

No need to train, he's a smooth operator
https://operatorlearning.sciml.ai/dev
MIT License
43 stars 8 forks source link

Create a FNO wrapper #22

Open pzimbrod opened 2 years ago

pzimbrod commented 2 years ago

In order to assimilate FourierLayer to the yet to implement DeepONet, it would be nice to have a Fourier Neural Operator (FNO) constructor that creates the entire architecture.

Something like:

model = FNO(in, out, latentspace, layercount, grid, modes, activation)

Instead of having to make the entire chain yourself:

layer = FourierLayer(latentspace, latentspace, grid, modes, activation)

model = Chain(
Dense(in, latentspace, activation),
layer,
layer,
[...],
Dense(latentspace, out, activation)
)

This doesn't add functionality but helps unify the API of the package. FourierLayer should still stay accessible via API as is since it offers a lot more control per layer than constructing the entire architecture with all the same global arguments.