Closed clarahm98 closed 3 years ago
@lululxvi
the paper you are referring to is great, I'm wondering how can be possible to replicate the Step 1 of that training strategy. Say that I have a PDE with:
then the usual output row at a given training step would be in the form:
[pde1, pde2, pde3, ic1, ic2, ic3, bc1, bc2]
The first supervised training phase would take into account only ICs and BCs, isn't it? If I simply set to zero the weights associated to the PDE's losses, I'd have this:
[0, 0, 0, ic1, ic2, ic3, bc1, bc2]
But I'm not sure, I feel like I'm paying a computational price to the unsupervised part of the problem anyway. What's the proper implementation of the Step 1 of that training strategy?
#
Thank you, Riccardo
It is correct. It is OK to just set those to be 0. It is true that it wastes some computation, but it is fine, because the first stage training only needs a few thousands of iterations, which is very fast. You can also check the github code of the paper https://github.com/alirezayazdani1/SBINNs
First of all thanks for this library and your replies. I am facing some troubles with the implementation of PINNs for a reaction-diffusion system (1 PDE + 1 coupled ODE) that I am trying.
The main issue that I am currently facing is that the order of magnitude of the pdes losses when they are started to be trained varies a lot from run to run. Sometimes, these losses are small (around 10^-1) and the model is able to converge to the correct solution while in others these losses are very big (10^4 or bigger) causing in some cases convergence issues (even the appearance of NaN values in the losses).
I have tried different ways to stabilize it (increasing the num_domain and num_boundary, decreasing lr, adaptative weights, etc) but the problem is still appearing. Could adding explicit boundary conditions for V help? I also don’t quite understand the location of the num_test points – if it is random, could that help explain the variability between the different runs? I do not know if adding some initial conditions for the V will help to increase its stabilization.
I do not know where it comes from (maybe from the definition of the pdes as they are stiff or it may come from the way the model is created). My goal (once I stabilize it) is to scale to 2D but in the few trials that I have done in 2D, the described problem persists and it is even more frequent. I would be very glad if you can provide me some suggestions about how to solve this problem.
The system that I am trying to solve is:
I have also added a Neuman boundary condition for the V. And this is how the data should look like (left: b and right: w). As mentioned, the problem is stiff.
You can find the data here (trial_1D_RK.zip) and this is the code that I am currently using: