jayroxis / pinns Goto Github PK
View Code? Open in Web Editor NEWPyTorch Implementation of Physics-informed Neural Networks
PyTorch Implementation of Physics-informed Neural Networks
Hello, thanks a lot for your hard work and your sharing.
I would like to ask why two optimizers are needed during the training.
self.optimizer.step(self.loss_func)
self.optimizer_Adam.step()
Thank you so much in advance for your answers.
Hi @jayroxis and thank you very much for this useful repository, really appreciated.
I was wondering if by any chance your pytorch implementation for the Burgers Equation inference solution, "time discrete" approach was also available and open to public?
Thank you again!
PS: sorry for asking this in an issue, I could not find your email.
The L2 test error in the original PINN text is 6.7e-4, but training with the pytorch version yields results of 1e-3~3e-3. What is the reason for this?
Hey Jay,
Thanks so much for creating this repository. It is quite helpful. I was wondering how you created the "burgers_shock.mat" data? Is this data computed by analytically solving the Burgers equation? Would it be possible to have the code you used to generate that?
Best,
-Amir
when i run file "Burgers Inference (PyTorch).ipynb" error_u = np.linalg.norm(u_star-u_pred,2)/np.linalg.norm(u_star,2)
in the folder “continuous_time_inference (Burgers)”, An error occurred that
OMP: Error #15: Initializing libiomp5md.dll, but found libiomp5md.dll already initialized.
OMP: Hint This means that multiple copies of the OpenMP runtime have been linked into the program. That is dangerous, since it can degrade performance or cause incorrect results. The best thing to do is to ensure that only a single OpenMP runtime is linked into the process, e.g. by avoiding static linking of the OpenMP runtime in any library. As an unsafe, unsupported, undocumented workaround you can set the environment variable KMP_DUPLICATE_LIB_OK=TRUE to allow the program to continue to execute, but that may cause crashes or silently produce incorrect results. For more information, please see http://www.intel.com/software/products/support/.
class Net:
...
def loss_func(self):
...
loss_pde = self.criterion(du_dt + u.squeeze() * du_dx, 0.01 / math.pi * du_dxx)
...
return loss
Here the code of loss_pde = self.criterion(du_dt + u.squeeze() * du_dx, 0.01 / math.pi * du_dxx)
of coefficient 0.01 / math.pi need to be (0.01 / math.pi) , and the code will be loss_pde = self.criterion(du_dt + u.squeeze() * du_dx, (0.01 / math.pi) * du_dxx)
.
Then the result will change. It's so amazing.
In the function 'loss_func' of 'Net class' of"Burgers.ipynb", do we need to add 'self.adam.zero_grad()' ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.