Closed whtwu closed 2 years ago
@whtwu, some suggestions (I am also new at DeepXDE
) -
net.apply_feature_transform()
)loss_weights
argument in model.compile()
to balance them (see the examples/demos).@whtwu, did you solve this issue?
@whtwu, did you solve this issue? Actually not yet, because recently I have been troubled by the problem of adding the Dirac function to the PDE of the original problem, so the work is stagnant; My engineering problem is that I need to add an excitation at a certain point in the beam, I need to use the Dirac function in the PDE, as the follows shows and I don't know how to implement it in code; I tried the code like below, but got an error。
@Saransh-cpp,Thank you very much for your suggestion, I didn't continue at that time due to the new problem, I will continue after the problem is solved.
@whtwu, did you solve this issue?
I think # def ddt(x, y): return dde.grad.hessian(y, x, i=0, j=1) # is wrong. It should be i=1,j=1
@FZUcipher yes, you're right, I have changed the constants of the problem to let the EI and ps to be the same order and other operations like less timedomain, etc. Lastly, the result is not very good.
@whtwu I also need to incorporate the Dirac delta function in PINN. May I ask how you defined the delta function in pde? In addition, for the numerical methods, such as the finite difference method, how to deal with the delta function? I am new to this research area. Could you mind sharing some experience about this problem?
@whtwu I also need to incorporate the Dirac delta function in PINN. May I ask how you defined the delta function in pde? In addition, for the numerical methods, such as the finite difference method, how to deal with the delta function? I am new to this research area. Could you mind sharing some experience about this problem?
sorry, actually, I don't know how to solve the problem, you can have a look at this issue #200.
@whtwu Thanks for your reply. From what I have searched, a common practice is to use a normal distribution to approximate the delta function. Happy to discuss with you!
Dear doctor lu@lululxvi: I am a new to deep learning ,I am using deepxde to sovle the flowing question, I need you help urgently, the problem setup is as follows: and here is my code and the running result. firstly i am not sure whether the code is correct, also the training and the test loss are too large, the curves don't drop, can you give me some advices? thanks for your precious time. `import deepxde as dde import numpy as np from deepxde.backend import tf def main(): e = 2E+11 i = 1 / 3 pow(10, -8) rou = 7850 l = 0.5 s = 4E-04 f = 50000 omiga = 40 np.pi
)
if name == "main": main()` Step Train loss Test loss Test metric
0 [1.31e+09, 1.48e-01, 5.53e-03, 1.14e-01, 1.01e-02] [1.25e+09, 1.48e-01, 5.53e-03, 1.14e-01, 1.01e-02] [4.28e+00]
1000 [1.09e+09, 1.08e+01, 6.23e+00, 9.60e+00, 2.73e+00] [1.71e+09, 1.08e+01, 6.23e+00, 9.60e+00, 2.73e+00] [3.70e+01]
2000 [1.06e+09, 1.28e+01, 7.93e+00, 1.22e+01, 6.97e+00] [1.62e+09, 1.28e+01, 7.93e+00, 1.22e+01, 6.97e+00] [4.09e+01]
3000 [9.84e+08, 1.20e+01, 1.01e+01, 1.12e+01, 8.89e+00] [1.61e+09, 1.20e+01, 1.01e+01, 1.12e+01, 8.89e+00] [3.93e+01]
4000 [9.60e+08, 7.78e+00, 1.09e+01, 7.56e+00, 8.44e+00] [1.70e+09, 7.78e+00, 1.09e+01, 7.56e+00, 8.44e+00] [3.18e+01]
5000 [9.49e+08, 7.20e+00, 1.16e+01, 7.77e+00, 9.19e+00] [1.71e+09, 7.20e+00, 1.16e+01, 7.77e+00, 9.19e+00] [3.14e+01]
6000 [9.37e+08, 7.64e+00, 1.30e+01, 8.51e+00, 9.84e+00] [1.65e+09, 7.64e+00, 1.30e+01, 8.51e+00, 9.84e+00] [3.25e+01]
7000 [9.15e+08, 7.12e+00, 8.50e+00, 7.90e+00, 6.55e+00] [1.66e+09, 7.12e+00, 8.50e+00, 7.90e+00, 6.55e+00] [3.14e+01]
8000 [8.54e+08, 6.00e+00, 1.10e+01, 7.34e+00, 9.29e+00] [1.84e+09, 6.00e+00, 1.10e+01, 7.34e+00, 9.29e+00] [2.96e+01]
9000 [8.23e+08, 4.92e+00, 1.10e+01, 5.93e+00, 9.17e+00] [1.85e+09, 4.92e+00, 1.10e+01, 5.93e+00, 9.17e+00] [2.67e+01]
10000 [7.89e+08, 5.11e+00, 1.13e+01, 6.11e+00, 1.13e+01] [2.03e+09, 5.11e+00, 1.13e+01, 6.11e+00, 1.13e+01] [2.72e+01]
Best model at step 10000: train loss: 7.89e+08 test loss: 2.03e+09 test metric: [2.72e+01] thanks a lot wuteng