-
Notifications
You must be signed in to change notification settings - Fork 755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tensorflow 1.x backend: multiple outputs extension of DeepONet #1410
Conversation
There are different ways for multiple outputs. Can you describe how you implement it? |
I chose the method presented in the article https://arxiv.org/abs/2106.05384 The formula (1) Thereby the original implementation of formula (1) has been extracted into a method
|
In https://doi.org/10.1016/j.cma.2022.114778, we introduced a few ways for multiple outputs. But it is unclear yet which one is better. |
My implementation closely resembles the first option outlined in section 3.1.6:
It may be worth considering a future enhancement where all methods are implemented, allowing users to choose approach using a parameter in init(). |
@lululxvi I have added the approaches described in https://doi.org/10.1016/j.cma.2022.114778 |
Added DeepONet strategies to __init__.py for tensorflow 2.x
Changed SplitStrategy to SplitBothStrategy
Fixes output so it is [:,:,num_outputs] and not [num_outputs,:,:]
Changed key "split" to "split_both"
Update deeponet.py for tf2 multiple outputs
@mitchelldaneker I merged your branch but there are some issues identified by Codacy. Please check https://app.codacy.com/gh/lululxvi/deepxde/pullRequest?prid=12314151 |
I have made changes addressing these issues via a new pull request. Please take a look. I moved the input transform and output transform into the |
add in older fixes
wrong file change, fixed
Fix codacy errors in tf2_multiple_outputs
fix extra input to call function
removed unused args
Tf2 multiple outputs fix codacy errors of extra inputs and unused imports
@lululxvi the code is now ready for your review |
This PR becomes very long now and hard to review. Is it possible to split this PR into a few smaller ones? |
This pull request suggests an enhancement to DeepONet, addressing its current limitation of producing only a scalar output, which restricts its applicability in various tasks. The functionality of handling multiple outputs has been added to both the DeepONet and DeepONetCartesianProd classes. This extension is currently implemented solely for the TensorFlow 1.x backend. Also the PR includes an example of usage for a Poisson-like 2D problem.