jpzxshi / learner

21 stars 2 forks source link

Generalization of antiderivative operator #1

Open Anldrnz opened 2 years ago

Anldrnz commented 2 years ago

Hi, first of all I appreciate your work, thank you for creating this repo. I have been working on the deeponet example for the antiderivative operator. I wanted to increase the time span from (0,1) to (-5,5) for example. However, I could not get successful results. If I understood correctly, the variable "T" determines the time span limit. When I change it to T=2, the training and results do not converge to exact solution. When changing T, I also changed the time span variables in gaussian_process and generate functions too(interpolation, solve_ivp, u_sensors). Could you help me understand how to get a generalized solution?

jpzxshi commented 2 years ago

Hi, thank you for your attention! I didn't see the variable "T" in code examples/example_deeponet.py, maybe the code you run is not the current version. I tried your case and got successful result. For example, let new interval be [0, 2], line 35, 37, 38, 44, 50, 51: change 0, 1 -> 0, 2 line 36: change x = np.sort(np.random.rand(self.p)) -> x = np.sort(np.random.rand(self.p)) * (2 - 0) + 0 line 69, 77, 78: set train_num = 5000, iterations = 5000, print_every = 1000 Then you will get right result. You can enlarge dataset and increase iterations if you want more accurate result.

Anldrnz commented 2 years ago

Hi again, you are right I changed the code a little bit from another work, by saying T I was talking about the interval end limits (for example the "1" in the (0,1) in lines 35,37,38 and so on). Anyway, what I did miss was the change in line 36, now I corrected it thanks to you. Really thank you for your help and once again appreciate your work which helped me a lot in understanding and implementing the brilliant idea of DeepOnet.