lululxvi / deeponet

Learning nonlinear operators via DeepONet
Other
474 stars 130 forks source link

More than one input function maps to more than one output function by DeepONet #27

Closed LVJIAQI777 closed 1 year ago

LVJIAQI777 commented 1 year ago

Hello Dr. Lu, It is very nice to get your reply. Following your answer, I think the data of the branch nets may be like this: [ u1(x1), ..., u1(xm) ] for one input function u1; [ u1(x1), ..., u1(xm), u2(x1), ..., u2(xm) ] for two input function u1 & u2. Or like this: [ u1(x1), u2(x1),..., u1(xm), u2(xm) ] ? I think the former seems to be the case. Do I have the correct understanding? I am looking forward to your reply. Thanks in advance.

Originally posted by @WangYicunZJU in https://github.com/lululxvi/deeponet/issues/9#issuecomment-901184441

LVJIAQI777 commented 1 year ago

Hello Dr. Lu, Thank you very much for the DeepXDE you developed,Now I'm using DeepOnet to my work. But I ran into some problems with input data and output data. Just like this paper "DeepM&Mnet for hypersonics: Predicting the coupled flow and finite-rate chemistry behind a normal shock using neural-network approximation of operators" and for example (rho_N2, rho_O2) --> rho_NO, if nodes=100(after shock also 1D),training_number = 200, and one function rho_N2 has shape (200,100),Just like the answer quoted, simply concatenate the two functions into a long vector, and two function are connected into (400,100) the x is (100,1),so input ((400,100),(100,1)),and output is (200,100) and here is my question:using data.TripleCartesianProd and nn.DeepONetCartesianProd image When there are multiple input functions, the data format is not satisfied with Triple. Could you please answer my confusion? I am looking forward to your reply!

lululxvi commented 1 year ago

For multiple inputs, see MIONet https://arxiv.org/abs/2202.06137 It is also helpful to read https://doi.org/10.1016/j.cma.2022.114778

LVJIAQI777 commented 1 year ago

Thank you very much for your answer! The MIONet idea is brilliant, which solved the problem of multiple inputs perfectly, I also noticed this in the first paper you mentioned, you achieve multiple inputs by concatenating the input functions together as the input of DeepONet branch net. It does work and I want to know in this paper("DeepM&Mnet for hypersonics...") When you realize G,UT image This is an example of multiple input and multiple outputs and are you simply concatenating all the input and output functions together using DeepONet? or Are you realize G,UT by training 2 DeepONets G,U and G,T, respectively just like you add in DeepM&Mnet in Sec 4?

If it is the first one, will the training be affected by the various magnitude of the output function? If the latter, whether the current DeepONet(and extension) has not been applied in the case of multiple output functions?

Please answer my questions. If there is any misunderstanding, please point it out! Thx!

lululxvi commented 1 year ago

in this paper("DeepM&Mnet for hypersonics...") When you realize G,UT image

Please see https://doi.org/10.1016/j.cma.2022.114778 for multiple outputs.

LVJIAQI777 commented 1 year ago

Oh, I see, I also notice Q#24 thanks again!!!!!