Closed boyeac closed 3 years ago
Hey @lululxvi
I found that the solution to the problem is possible. Checking the other problems, I realized that I would need to normalize the variables and make a series of modifications that I've already incorporated because they were really wrong.
Now the code runs without errors referring to DeepXDE, but I'm getting some NaN in the functions in response. I believe they come from some normalization error, parameters, or errors in some equation.
If you can give me any ideas, I would appreciate it.
The output values are (typically): "" INFO:tensorflow:Optimization terminated with: Message: STOP: TOTAL NO. of f AND g EVALUATIONS EXCEEDS LIMIT Objective function value: nan Number of iterations: 2864 Number of functions evaluations: 15001 15002 [8.30e+06, 1.48e+06, 3.42e+02, 2.03e+03, 3.96e+05, 1.79e+06, 3.85e+04, 2.07e+02, 2.94e+05, 3.59e+05, 2.95e+05, 3.49e+05, 1.64e+05, 3.30e+04, 1.87e+05, 3.17e+00, nan, nan, 1.94e+07, 5.04e+05, 6.75e+03, 2.78e-06, 1.83e-05, 7.11e-06, nan, nan, nan, 1.03e+05, 9.67e-07, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan] [8.21e+06, 1.47e+06, 3.39e+02, 2.00e+03, 2.35e+07, 2.40e+06, 3.93e+04, 1.56e+03, 4.97e+12, 7.89e+11, 1.66e+08, 1.99e+13, 5.53e+10, 3.27e+04, 6.26e+07, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00, 0.00e+00] []
Best model at step 0: train loss: inf test loss: inf test metric: 'train' took 425.262300 s ""
Thank you very much.
Your loss like 8.30e+06 is too large, so the SGD may just blow up. You can either scale your problem such that the loss in step 1 is O(1), or you can use a small loss_weights
in Model.compile()
.
@lululxvi How can I scale the components in the PDE to the same order of magnitude? For example, O(1)
See FAQ: Q: I failed to train the network or get the right solution, e.g., large training loss, unbalanced losses.
Hi @lululxvi
Thank you in advance for your attention and for making this tool available.
I'm trying to solve a complex problem described by a system of partial differential equations and algebraic (PDAE). My difficulty is in getting Deepxde to understand the different initial and boundary conditions that the system requires.
Of the problems I found on git, I haven't seen any algebraic equations that need to be solved together with the partial ones.
Do you believe it is possible to resolve these types of issues with the current version of Deepxde? Are there any examples that you have already managed to solve?
At the moment, I have an error like: "File "...\deepxde\boundary_conditions.py", line 29, in filter return X[self.on_boundary(X, self.geom.on_boundary(X))]
IndexError: arrays used as indices must be integer (or boolean) type".
The code is:
from future import absolute_import from future import division from future import print_function import numpy as np
import deepxde as dde
Functions
def main():
Constants
if name == "main": main()
End of the code
Thanks for the help!