Skip to content
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

If the input of the trunk net could be set to be different #28

Open
cb-sjtu opened this issue Aug 25, 2022 · 7 comments
Open

If the input of the trunk net could be set to be different #28

cb-sjtu opened this issue Aug 25, 2022 · 7 comments

Comments

@cb-sjtu
Copy link

cb-sjtu commented Aug 25, 2022

Hello Dr. Lu,

I am Bo Chen from SJTU. We had some communication before in online
conference, and I have read your code of the article"A comprehensive and fair
comparison of two neural operators (with practical extensions) based on FAIR
data". It is really wonderful work and I have learnt a lot from it.

But it can be found that in the cases you offered, the input of the trunk
net is always the same distribution for every input of the branch net so that
the data can be set by "dde.data.TripleCartesianProd()" with a grid of only one
distribution.

However in my application, the input of the trunk net must be different
distribution because of the data limitation of labels. This situation is just
mentioned in your article as case I or case II ,which means different u have the
different locations of ξ.

image

I have made same attempts but it seems that the shape of data_trunknet
is fixed and hard to be changed. And I also see a type of error
"ValueError("DeepONet does not support setting trunk net input.")" in the
code even though I did not meet this kind of error in my attempts.

So I wonder if there is a method of that could feed the input of the trunk
net with different distribution to DEEPONET. If possible, could you give me
some guidance or a simple demo is better.

Thanks very much!

Looking forword to your reply!

@lululxvi
Copy link
Owner

@cb-sjtu cb-sjtu closed this as completed Sep 2, 2022
@cb-sjtu cb-sjtu reopened this Sep 2, 2022
@cb-sjtu
Copy link
Author

cb-sjtu commented Sep 2, 2022

Dr. Lu,
Thank you very much for your reply!
I have read this demo before. But the "random location x" in this demo is "only one". I wonder if the input shape could be (dataset size, Nu, dimension), i.e., (10000,100, 1) for the training dataset of the trunk net , whose "Nu" is defined in the demo of "Antiderivative operator from an aligned dataset".
So I mean that in the demo of "Antiderivative operator from an aligned dataset", We assume that for each u, we have the values of u(x) in the same Nu=100 locations. But if deeponet could handle this dataset that for each u, we have the values of u(x) in the different Nu=100 locations.

@cb-sjtu
Copy link
Author

cb-sjtu commented Sep 2, 2022

And I have made this problem done by editing the code you provide named as "darcy_triangular_notch" which don't use deepxde and is easier to be edited. But I am still looking forword to your reply about the confusion above.

@lululxvi
Copy link
Owner

lululxvi commented Sep 8, 2022

@cb-sjtu
Copy link
Author

cb-sjtu commented Nov 20, 2022

Dr. Lu,
Thank you very much for your reply!
I have figured out how to set the "unaligned dataset" thanks to your guidance.
Another mystery that I'm not sure about the dataset is whether the "unaligned dataset" could be feed into POD_DeepONet. In my opinion, it can't be done because of the "tf.concat" about "self.pod_basis" and "x_loc".
Looking forword to your reply please!

@lululxvi
Copy link
Owner

You are right.

@cb-sjtu
Copy link
Author

cb-sjtu commented Nov 27, 2022

Thank you very much!
Best wishes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants