PINNs-TF2.0 icon indicating copy to clipboard operation
PINNs-TF2.0 copied to clipboard

1dcomplex-schrodinger does not converge

Open EyalRozenberg1 opened this issue 5 years ago • 3 comments

Hay the 1dcomplex-schrodinger does not converge to results presented in the article. maybe there is additional commit missing?

ps. I did sanity chack by running 1d-burgers from current commit and it actually worked well in the same environment.

thanks

EyalRozenberg1 avatar Feb 23 '20 12:02 EyalRozenberg1

Hey, sorry I haven't maintained this in a while, but as far as I remember, I didn't get this one to converge indeed

pierremtb avatar Feb 26 '20 17:02 pierremtb

I just re-built a version of this and had to make some changes to the network structure to achieve convergence. Your layer input regularization (for which you use a lambda layer in Keras) isn't applied to every layer, which is likely causing an issue with the size of the gradients. Since the tanh function is used (which is really only good in a small range), a large value in the output of the dense layer is likely causing the gradients to vanish as the training progresses. I had to create a custom layer in Keras to implement the regularization Raissi used, which fixed the issue for me. However, I did this for continuous inference of Allan-Cahn, not schrodingers. So you may achieve better convergence in this version if you change your activations from tanh to LeakyReLU. Or build a custom class layer instead of using the built-in Dense layer from Keras (which is what I did) to fix this issue.

levimcclenny avatar Aug 15 '20 20:08 levimcclenny

Thanks for the input @levimcclenny!

vm-pierre avatar Aug 15 '20 20:08 vm-pierre