Skip to content

wsr2002/FNO_torch

Repository files navigation

Fourier Neural Operator (FNO)

Introduction

The Fourier Neural Operator (FNO) is designed to solve Partial Differential Equation (PDE) problems in real‑world applications. This repository contains implementations of FNO focused on 1D and 2D PDE cases using PyTorch.

Environment Setup

To set up your environment to use the Fourier Neural Operator, follow these steps:

  1. Install the necessary packages using pip or conda:
    pip install -r requirements.txt
    conda install -r requirements.txt

Notice for GPU Users

Ensure your installed torch and torchvision versions match your CUDA toolkit. You can find the correct command for your CUDA version at https://pytorch.org/get-started/locally/.
If needed, uninstall and reinstall PyTorch with:

pip uninstall torch torchvision
pip install torch==<version>+cuXXX torchvision==<version>+cuXXX -f https://download.pytorch.org/whl/torch_stable.html

Using FNO

Once the environment is set up, import the FNO module in your scripts or notebooks:

from fno import FNO1d, FNO2d
# then instantiate and train your model

Examples

Examples of execution are stored in test_1d.ipynb and test_2d.ipynb. These notebooks demonstrate how to apply the Fourier Neural Operator in 1D and 2D PDE problems with PyTorch.

Dataset Availability

Due to restrictions on GitLab, the datasets used here must be downloaded separately:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors