Coder Social home page Coder Social logo

pierremtb / pinns-tf2.0 Goto Github PK

View Code? Open in Web Editor NEW
237.0 13.0 87.0 3.96 MB

TensorFlow 2.0 implementation of Maziar Raissi's Physics Informed Neural Networks (PINNs).

License: MIT License

Python 3.07% MATLAB 0.33% Mathematica 96.61%
physics-informed deep-neural-networks tf2 partial-differential-equations mechanical-engineering

pinns-tf2.0's Introduction

PINNs-TF2.0

Implementation in TensorFlow 2.0 of different examples put together by Raissi et al. on their original publication about Physics Informed Neural Networks.

By designing a custom loss function for standard fully-connected deep neural networks, enforcing the known laws of physics governing the different setups, their work showed that it was possible to either solve or discover with surprisingly good accuracy Partial Differential Equations from noisy and scarce data. The very kind that is widespread in real-life applications.

Don’t forget the --recursive flag while cloning, in order to fetch the experiments data put together by Raissi et al:

git clone https://github.com/pierremtb/PINNs-TF2.0 --recursive

Also available on Google Colab (installation-free, GPU-enabled cloud notebooks)

Authors and citations

For more information, please refer to the following: (https://maziarraissi.github.io/PINNs/)

@article{raissi2017physicsI,
    title={Physics Informed Deep Learning (Part I): Data-driven Solutions of Nonlinear Partial Differential Equations},
    author={Raissi, Maziar and Perdikaris, Paris and Karniadakis, George Em},
    journal={arXiv preprint arXiv:1711.10561},
    year={2017}
}

@article{raissi2017physicsII,
    title={Physics Informed Deep Learning (Part II): Data-driven Discovery of Nonlinear Partial Differential Equations},
    author={Raissi, Maziar and Perdikaris, Paris and Karniadakis, George Em},
    journal={arXiv preprint arXiv:1711.10566},
    year={2017}
}

License

MIT License

Copyright (c) 2019 Pierre Jacquier

pinns-tf2.0's People

Contributors

pierremtb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pinns-tf2.0's Issues

1dcomplex-schrodinger does not converge

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

why importing of .mat file require

Dear Pierra
why the "burgers_shock.mat" file is required to proceed further for solving burger eq,
Is there any alternate way to proceed further.

and how burgers_shock.mat file has generated

The question of continuous idenfication and discrete identification

When I run code on colab, I always get errors when running the continuous idenfication and discrete identification modules:

None
—— Starting Adam optimization ——

KeyError Traceback (most recent call last)
in <cell line: 40>()
38 layers[-1] = q
39 pinn = PhysicsInformedNN(layers, tf_optimizer, logger, dt, lb, ub, q, IRK_alpha, IRK_beta)
---> 40 pinn.fit(x_0, u_0, x_1, u_1, tf_epochs)
41 U_0_pred, U_1_pred = pinn.predict(x_star)
42 lambda_1_pred_noisy, lambda_2_pred_noisy = pinn.get_params(numpy=True)

13 frames
/usr/local/lib/python3.10/dist-packages/keras/optimizers/optimizer.py in _update_step(self, gradient, variable)
230 return
231 if self._var_key(variable) not in self._index_dict:
--> 232 raise KeyError(
233 f"The optimizer cannot recognize variable {variable.name}. "
234 "This usually means you are trying to call the optimizer to "

KeyError: in user code:

File "/usr/local/lib/python3.10/dist-packages/keras/optimizers/optimizer.py", line 224, in _update_step_xla  *
    return self._update_step(gradient, variable)
File "/usr/local/lib/python3.10/dist-packages/keras/optimizers/optimizer.py", line 232, in _update_step  **
    raise KeyError(

KeyError: 'The optimizer cannot recognize variable dense_4/kernel:0. This usually means you are trying to call the optimizer to update different parts of the model separately. Please call `optimizer.build(variables)` with the full list of trainable variables before the training loop or use legacy optimizer `tf.keras.optimizers.legacy.Adam.'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.