Skip to content

Latest commit

 

History

History

docs

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Some docs on the FNO and CFNO stuff ...

Generated

  • fno.svg : graphical representation of a 1D FNO with one Fourier layer
  • fno2d.svg : graphical representation of a 2D FNO with one Fourier layer
  • cfno2d.svg: graphical representation of a 2D Chebyshev-Fourier Neural Operator (CFNO) with one Fourier layer

Useful links

Code for the original approach (old documentation)

Model Training

For 2D Rayleigh Benard Convection (RBC) problem the data is generated using Dedalus. See also the dedalus folder.

Fourier Neural Operator 2D Spatial + Recurrent in time and Fourier Neural Operator 2D Spatial + 1D time solver for RBC 2D.

Example submission scripts to train on JUWELS Booster is shown in submit_training.sbatch.sh.

Model Inference

Once a model is trained, it is saved into a checkpoint file, that are stored in the model_archive companion repo as *.pt files (weights of the model). Which each of those models is associated a YAML configuration file, that stores all the model setting parameters.

One given trained model should be used like this :

from fnop.inference import FNOInference

# Load the trained model
model = FNOInference(
    config="path/to/configFile.yaml",
    checkpoint="path/to/checkpointFile.pt")

u0 = ... # some solution of RBC at a given time
# --> numpy.ndarray format, with shape (nVar, nX, nZ), with nVar = 4

# In particular, uInit could be unpacked like this :
vx0, vy0, b0, p0 = u0

# Evaluate the model with a given initial solution using a fixed time-step
u1 = model.predict(u0)  # -> only one time-step !

# --> u1 can also be unpacked like u0, e.g :
vx1, vy1, b1, p1 = u1

# Time-step of the model can be retrieved like this :
dt = model.dt 	# -> can be either an attribute or a property