2021-07-16 11:35:43 +08:00
# IDRLnet
2021-07-05 11:18:12 +08:00
[](https://www.apache.org/licenses/LICENSE-2.0)
2021-07-16 11:35:43 +08:00
[](https://python.org)
2021-07-09 08:26:53 +08:00
[](https://idrlnet.readthedocs.io/en/latest/?badge=latest)
2021-07-16 11:35:43 +08:00
[](https://badge.fury.io/py/idrlnet)
[](https://hub.docker.com/r/idrl/idrlnet)
[](https://www.codefactor.io/repository/github/idrl-lab/idrlnet/overview/master)
2021-07-15 11:26:51 +08:00
2022-08-15 11:16:03 +08:00
**IDRLnet** is a machine learning library on top of [PyTorch ](https://pytorch.org/ ). Use IDRLnet if you need a machine learning library that solves both forward and inverse differential equations via physics-informed neural networks (PINN). IDRLnet is a flexible framework inspired by [Nvidia Simnet ](https://developer.nvidia.com/simnet> ).
2021-07-15 11:26:51 +08:00
2021-07-16 11:35:43 +08:00
## Docs
- [Full docs ](https://idrlnet.readthedocs.io/en/latest/ )
- [Tutorial ](https://idrlnet.readthedocs.io/en/latest/user/get_started/tutorial.html )
2021-07-20 08:00:46 +08:00
- Paper:
- IDRLnet: A Physics-Informed Neural Network Library. [arXiv ](https://arxiv.org/abs/2107.04320 )
2021-07-16 11:35:43 +08:00
2021-07-05 11:18:12 +08:00
## Installation
2021-07-15 11:26:51 +08:00
Choose one of the following installation methods.
### PyPI
2021-07-18 15:22:02 +08:00
Simple installation from PyPI.
2021-07-15 11:26:51 +08:00
```bash
pip install -U idrlnet
```
Note: To avoid version conflicts, please use some tools to create a virtual environment first.
2021-07-05 11:18:12 +08:00
### Docker
2021-07-18 15:22:02 +08:00
Pull latest docker image from Dockerhub.
2021-07-05 11:18:12 +08:00
```bash
2021-07-15 11:26:51 +08:00
docker pull idrl/idrlnet:latest
2021-07-18 15:22:02 +08:00
docker run -it idrl/idrlnet:latest bash
2021-07-05 11:18:12 +08:00
```
2021-07-18 15:22:02 +08:00
Note: Available tags can be found in [Dockerhub ](https://hub.docker.com/repository/docker/idrl/idrlnet ).
2021-07-05 11:18:12 +08:00
### Anaconda
2021-07-16 11:35:43 +08:00
```bash
conda create -n idrlnet_dev python=3.8 -y
conda activate idrlnet_dev
pip install idrlnet
```
2021-07-15 11:26:51 +08:00
### From Source
```
2023-06-29 10:46:16 +08:00
git clone https://github.com/idrl-lab/idrlnet
2021-07-05 14:25:26 +08:00
cd idrlnet
2021-07-05 11:18:12 +08:00
pip install -e .
```
## Features
IDRLnet supports
2022-08-15 11:16:03 +08:00
- complex domain geometries without mesh generation. Provided geometries include interval, triangle, rectangle, polygon, circle, sphere... Other geometries can be constructed using three boolean operations: union, difference, and intersection;

2022-08-15 14:27:02 +08:00
- sampling in the interior of the defined geometry or on the boundary with given conditions.
- enables the user code to be structured. Data sources, operations, constraints are all represented by ``Node``. The graph will be automatically constructed via label symbols of each node. Getting rid of the explicit construction via explicit expressions, users model problems more naturally.
- builds computational graph automatically;

- user-defined callbacks;

2021-07-05 11:18:12 +08:00
- solving variational minimization problem;
2022-08-15 11:16:03 +08:00
< img src = "https://raw.githubusercontent.com/weipeng0098/picture/master/20210617082331.gif" alt = "miniface" style = "zoom:33%;" / >
2022-08-15 14:27:02 +08:00
- solving integral differential equation;
- adaptive resampling;
2021-07-05 11:18:12 +08:00
- recover unknown parameters of PDEs from noisy measurement data.
It is also easy to customize IDRLnet to meet new demands.
- Main Dependencies
- [Matplotlib ](https://matplotlib.org/ )
- [NumPy ](http://www.numpy.org/ )
- [Sympy ](https://https://www.sympy.org/ )==1.5.1
- [pytorch ](https://www.tensorflow.org/ )>=1.7.0
## Contributing to IDRLnet
First off, thanks for taking the time to contribute!
2023-06-29 10:46:16 +08:00
- **Reporting bugs.** To report a bug, simply open an issue in the GitHub "Issues" section.
2021-07-05 11:18:12 +08:00
2022-08-15 11:16:03 +08:00
- **Suggesting enhancements.** To submit an enhancement suggestion for IDRLnet, including completely new features and minor improvements to existing functionality, let us know by opening an issue.
- **Pull requests.** If you made improvements to IDRLnet, fixed a bug, or had a new example, feel free to send us a pull-request.
2021-07-05 11:18:12 +08:00
- **Asking questions.** To get help on how to use IDRLnet or its functionalities, you can as well open an issue.
- **Answering questions.** If you know the answer to any question in the "Issues", you are welcomed to answer.
## The Team
IDRLnet was originally developed by IDRL lab.
2021-07-15 11:26:51 +08:00
## Citation
Feel free to cite this library.
```bibtex
@article {peng2021idrlnet,
title={IDRLnet: A Physics-Informed Neural Network Library},
author={Wei Peng and Jun Zhang and Weien Zhou and Xiaoyu Zhao and Wen Yao and Xiaoqian Chen},
year={2021},
eprint={2107.04320},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
```