BSD 3-Clause "New" or "Revised" License

项目介绍

rezaakb/pinns-tf2 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,采用 BSD 3-Clause "New" or "Revised" License 许可证,目前获得 166 个 Star、38 次 Fork。

仓库全名
rezaakb/pinns-tf2
开源许可证
BSD 3-Clause "New" or "Revised" License
Star 数
166
Fork 数
38
未关闭 Issue
4

README 摘要

[Paper] - [PyTorch] - [JAX] - [TensorFlow v1] Description PINNs-TF2 is a Python package built on the TensorFlow V2 framework. It not only accelerates PINNs implementation but also simplifies user interactions by abstracting complex PDE challenges. We underscore the pivotal role of compilers in PINNs, highlighting their ability to boost performance by up to 119x. Each subplot corresponds to a problem, with its…

完整内容见 GitHub 原始 README 或本页 。

常见问题

pinns-tf2 用什么语言开发?

主要使用 Python 编写,采用 BSD 3-Clause "New" or "Revised" License 许可证,目前有 166 个 Star。

pinns-tf2 可以免费商用吗?

仓库采用 BSD 3-Clause "New" or "Revised" License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 pinns-tf2 的源码?

可以直接克隆仓库:git clone https://github.com/rezaakb/pinns-tf2.git;安装与运行步骤见仓库 README。

pinns-tf2 最近还在维护吗?

仓库最近一次更新为 2024年5月23日,当前有 4 个未关闭 Issue;Star 数为 166,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

PINNs-TF2, Physics-informed Neural Networks (PINNs) implemented in TensorFlow V2.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
408
价值分
127
活跃状态
活跃

语言占比

Jupyter Notebook
Makefile
Python

贡献者

README

Description

PINNs-TF2 is a Python package built on the TensorFlow V2 framework. It not only accelerates PINNs implementation but also simplifies user interactions by abstracting complex PDE challenges. We underscore the pivotal role of compilers in PINNs, highlighting their ability to boost performance by up to 119x.


Each subplot corresponds to a problem, with its iteration count displayed at the top. The logarithmic x-axis shows the speed-up factor w.r.t the original code in TensorFlow v1, and the y-axis illustrates the mean relative error.

For more information, please refer to our paper:

PINNs-TF2: Fast and User-Friendly Physics-Informed Neural Networks in TensorFlow V2. Reza Akbarian Bafghi, and Maziar Raissi. ML4PS, NeurIPS, 2023.

Installation

PINNs-TF2 requires following dependencies to be installed:

Then, you can install PINNs-TF2 itself via [pip]:

pip install pinnstf2

If you intend to introduce new functionalities or make code modifications, we suggest duplicating the repository and setting up a local installation:

git clone https://github.com/rezaakb/pinns-tf2
cd pinns-tf2

# [OPTIONAL] create conda environment
conda create -n myenv python=3.9
conda activate myenv

# install package
pip install -e .

Quick start

Explore a variety of implemented examples within the examples folder. To run a specific code, such as the one for the Navier-Stokes PDE, you can use:

python examples/navier_stokes/train.py

You can train the model using a specified configuration, like the one found in examples/navier_stokes/configs/config.yaml. Parameters can be overridden directly from the command line. For instance:

python examples/navier_stokes/train.py trainer.max_epochs=20 n_train=3000

To utilize our package, there are two primary options:

  • Implement your training structures using Hydra, as illustrated in our provided examples.
  • Directly incorporate our package to solve your custom problem.

For a practical guide on directly using our package to solve the Schrödinger PDE in a continuous forward problem, refer to our tutorial here: tutorials/0-Schrodinger.ipynb.

Data

The data located on the server and will be downloaded automatically upon running each example.

Contributing

As this is the first version of our package, there might be scope for enhancements and bug fixes. We highly value community contributions. If you find any issues, missing features, or unusual behavior during your usage of this library, please feel free to open an issue or submit a pull request on GitHub. For any queries, suggestions, or feedback, please send them to Reza Akbarian Bafghi at [email protected].

License

Distributed under the terms of the [BSD-3] license, “pinnstf2” is free and open source software.

Resources

We employed this template to develop the package, drawing from its structure and design principles. For a deeper understanding, we recommend visiting their GitHub repository.

Citation

@article{AkbarianBafghi2023PINNsTF2FA,
  title={PINNs-TF2: Fast and User-Friendly Physics-Informed Neural Networks in TensorFlow V2},
  author={Reza Akbarian Bafghi and Maziar Raissi},
  journal={ArXiv},
  year={2023},
  volume={abs/2311.03626},
  url={https://api.semanticscholar.org/CorpusID:265043331}
}

评论

暂无评论