-
|
I have the following implementation of a PDE def pde(t, y): Here mu is a constant. The rest of the code is standard and irrelevant to the issue as the only part that is problematic is the division by the norm of y: r = tf.norm(y, axis=1, keepdims=True). The shape of y is (none, 2). The shapes of y[:,0:1] and r is (none ,1), so it makes sense to do y[:,0:1] / r**3. However this is the source of the problem. If, for example, I take r to be a scalar or remove it altogether from the code, everything works fine. But with r defined as above, I get the following errors: Training model... 0 [nan, nan, 6.40e+07, 0.00e+00, 1.72e-02, 4.17e+01] [nan, nan, 6.40e+07, 0.00e+00, 1.72e-02, 4.17e+01] [] Best model at step 0: 'train' took 1.271964 s Saving loss history to /content/loss.dat ...
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
I don't know if this is an issue with DeepXDE or I'm missing something. Any help is appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
I found the cause of the problem. It's division by zero. |
Beta Was this translation helpful? Give feedback.
I found the cause of the problem. It's division by zero.