deepxde icon indicating copy to clipboard operation
deepxde copied to clipboard

How to train a model that suits for different initial conditions

Open yingriyanlong opened this issue 2 years ago • 2 comments

Hi, doctor lu, thanks for your brilliant job.

Recently, based on deepxde, I have implemented the solution of an ODE systems with 4 equations. The initial condition was privided by the dde.icbc.IC module. However, the trained model can only make predictions based on the specific initial condition set before training.

I need a model that can work for different initial conditions, just like the initial conditon is also a input to the network. I have read the Q&A section of documents and I have some ideas as follows:

  1. The 4 initial conditions are another 4 inputs to the network besides the time domain;
  2. Use dde.geometry.Timedomain to generate training and test datasets, then mesh them with discrete intial condition dataset, then use anchors=... to pass the mesh results to the network;
  3. Pass a empty list to bcs in dde.data.PDE class;
  4. Based on the time domain input, use tf.sign or tf.where functions to segment ODE equations as a initial part and a normal part;
  5. The initial part return a MSE loss bewteen y(t=0) and initial condition inputs;
  6. The normal part return the results of normalized ODE quations.

Based on your experience, is this feasible enough? Or do you have any experiences and methods? Looking forward to your suggestions @lululxvi , thanks a lot.

yingriyanlong avatar Apr 12 '22 04:04 yingriyanlong

Maybe you can read the DeepONet https://deepxde.readthedocs.io/en/latest/user/research.html#deeponet-mionet-deepm-mnet

forxltk avatar Apr 12 '22 06:04 forxltk

Also see FAQ "Q: Solve parametric PDEs."

lululxvi avatar Apr 14 '22 16:04 lululxvi