Add wavelet convolution layer#639
Add wavelet convolution layer#639sinapordanesh wants to merge 11 commits intoneuraloperator:mainfrom
Conversation
|
Besides the code and test cases, this wavelet-based operation relies on two extra dependencies:
|
|
Thank you @sinapordanesh - sorry for the delay in reviewing this. Seems there is a failing test. |
Thank you, @JeanKossaifi, for reviewing this PR. I've mentioned required dependencies here: Hopefully they are legitimate packages and can be included in your testing environment. |
|
This sounds good to me
…On Wed, Sep 10, 2025 at 5:51 AM Jean Kossaifi ***@***.***> wrote:
*JeanKossaifi* left a comment (neuraloperator/neuraloperator#639)
<#639 (comment)>
I agree, it seems useful to me.
I think we could make the import optional as we did with e.g. Spherical
Harmonics? @dhpitt <https://github.com/dhpitt> @vduruiss
<https://github.com/vduruiss> what do you think?
—
Reply to this email directly, view it on GitHub
<#639 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJWQJOGLXV6S3CKDTBAAZTT3R7YA5AVCNFSM6AAAAACD3LNK66VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENZUGE4TIOJUGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
- abstract funciton to form an einsum multiplication epxression, based on the dimension of the operation.
- branching 3 different spectral convolution for 1-3dim - wavelt transform for 1&2d with DWT module - wavelet transform for 3d with ptwt_wavedec3 module - building einsum for 3d locally - level adjust helper function for 1&2d - einsum helper function to execute the 1&2d einsums - 3d einsum seperated in the 3d branch at forward method. - Un-debugged version of forward method. adopted directly from paper code -> Debug it!
3255beb to
fea62f5
Compare
|
@JeanKossaifi, I fixed the dependency requirements and made it optional. |
Wavelet Neural Operator (WNO)
title={Wavelet Neural Operator for solving parametric partial differential equations in computational mechanics problems},
author={Tripura, Tapas and Chakraborty, Souvik},
journal={Computer Methods in Applied Mechanics and Engineering},
volume={404},
pages={115783},
year={2023},
publisher={Elsevier}}
Spectral convolution class and its helper functions for operator learning in wavelet space. Main added class is "SpectralConvWavelet" in
neuralop/layers/spectral_convolution_laplace.py, which handles 1-3 dimensions in an abstract way.The code mostly follows the paper code, just reformed in an abstract way to handle all 3 dimensions in a single class, via helper functions for building einsums sentences, some other common features through different paper classes.
A set of test cases is included in this PR under
neuralop/layers/tests/test_spectral_convolution_laplace.pyto test the basic features of the forward method of the spectral convolution.Comparison between paper code training results and the PR code results.
The PR code tested vs. regenerated results via code provided at the paper's repository at https://github.com/TapasTripura/WNO. We run all scenarios for which data was provided, as well as those runnable on our computational capacity.
Mean Testing Error
For testing the integrity of the PR spectral convolution class, we just exchanged the spectral convolution objects lists
self.convfrom the original classWaveConv<n>dto the PR classSpectralConvWavelet. The rest of the training scripts remained the same as the original.All the trainng data can be found in these links:
Link1, Link2, Link3
Detailed results and running scripts are in the following zip file.
scipts_and_results.zip