@inproceedings{
bafghi2023pinnstorch,
title={{PINN}s-Torch: Enhancing Speed and Usability of Physics-Informed Neural Networks with PyTorch},
author={Reza Akbarian Bafghi and Maziar Raissi},
booktitle={The Symbiosis of Deep Learning and Differential Equations III},
year={2023},
url={https://openreview.net/forum?id=nl1ZzdHpab}
}
Physics-informed neural networks (PINNs) stand out for their ability in supervised learning tasks that align with physical laws, especially nonlinear partial differential equations (PDEs). In this paper, we introduce "PINNs-Torch", a Python package that accelerates PINNs implementation using the PyTorch framework and streamlines user interaction by abstracting PDE issues. While we utilize PyTorch's dynamic computational graph for its flexibility, we mitigate its computational overhead in PINNs by compiling it to static computational graphs. In our assessment across 8 diverse examples, covering continuous, discrete, forward, and inverse configurations, naive PyTorch is slower than TensorFlow; however, when integrated with CUDA Graph and JIT compilers, training speeds can increase by up to 9 times relative to TensorFlow implementations. Additionally, through a real-world example, we highlight situations where our package might not deliver speed improvements. For community collaboration and future developments, our package code is accessible at: https://github.com/rezaakb/pinns-torch.
PINNs-Torch: Enhancing Speed and Usability of Physics-Informed Neural Networks with PyTorch
Reza Akbarian Bafghi Maziar Raissi