lululxvi / deepxde

A library for scientific machine learning and physics-informed learning
https://deepxde.readthedocs.io
GNU Lesser General Public License v2.1
2.66k stars 745 forks source link

Get a very small loss but the results are completely not correct #1584

Open weiroy opened 10 months ago

weiroy commented 10 months ago

Hi! @lululxvi Thanks very much for your amazing work! But I encountered a problem. Specifically, the loss is very small, but the results are completely not correct. I am wondering why this happend.

image

The loss is about 1e-5, in figure 2, the black line is the reference solution and the red line the prediction results of deepxde. And the governing equations, boundary conditions are as follows:

1f83bbef4af1624445515c1fc3096f6

Looking forward to your reply.

praksharma commented 10 months ago

If this is a well-posed problem with a unique solution, then you are making a mistake in the implementation. Can you please share the code with us? Remember to use the code snippet to paste your code.

jdellag commented 10 months ago

A low loss value should be viewed as an initial guess that the model is not fundamentally flawed. In other words, low loss values do not ensure high accuracy, but rather indicate that the model is correctly implemented on a basic level. A good example of this was a completely wrong formulation of my Navier Stokes PDE in spherical coordinates. Although I achieved a low loss, I was not able to get the precision that I needed, which caused me to go back over my code and find the mistake.

weiroy commented 10 months ago

If this is a well-posed problem with a unique solution, then you are making a mistake in the implementation. Can you please share the code with us? Remember to use the code snippet to paste your code.

It's my mistake, the right ode system is as follows. But I encountered another problem, the small coefficient 0.001 seem to make the results of pinn hard to converge to the reference solution image