Skip to main content

Deep learning library for solving differential equations

Project description


Build Status Documentation Status Codacy Badge PyPI Version PyPI Downloads Conda Version Conda Downloads License

DeepXDE is a deep learning library for solving differential equations on top of TensorFlow.

Use DeepXDE if you need a deep learning library that

  • solves partial differential equations (PDEs),
  • solves integro-differential equations (IDEs),
  • solves fractional partial differential equations (fPDEs),
  • solves inverse problems for differential equations,
  • approximates functions from a dataset with/without constraints,
  • approximates functions from multi-fidelity data,
  • approximates operators.

DeepXDE is extensible to solve other problems in Scientific Machine Learning.

Documentation: ReadTheDocs


  • Algorithms & examples

  • Applications

    • Inverse problems in nano-optics and metamaterials: arXiv


DeepXDE supports

  • complex domain geometries without tyranny mesh generation. The primitive geometries are interval, triangle, rectangle, polygon, disk, cuboid, and sphere. Other geometries can be constructed as constructive solid geometry (CSG) using three boolean operations: union, difference, and intersection;
  • multi-physics, i.e., coupled PDEs;
  • 5 types of boundary conditions (BCs): Dirichlet, Neumann, Robin, periodic, and a general BC;
  • time-dependent PDEs are solved as easily as time-independent ones by only adding initial conditions;
  • residual-based adaptive refinement (RAR);
  • uncertainty quantification using dropout;
  • two types of neural networks: fully connected neural network, and residual neural network;
  • many different losses, metrics, optimizers, learning rate schedules, initializations, regularizations, etc.;
  • useful techniques, such as dropout and batch normalization;
  • callbacks to monitor the internal states and statistics of the model during training;
  • enables the user code to be compact, resembling closely the mathematical formulation.

All the components of DeepXDE are loosely coupled, and thus DeepXDE is well-structured and highly configurable. It is easy to customize DeepXDE to meet new demands.


DeepXDE requires TensorFlow 1 to be installed. (Sorry, but DeepXDE does not support TensorFlow 2 yet.) Then, you can install DeepXDE itself.

  • Install the stable version with pip:
$ pip install deepxde
  • Install the stable version with conda:
$ conda install -c conda-forge deepxde
  • For developers, you should clone the folder to your local machine and put it along with your project scripts.
$ git clone

Cite DeepXDE

If you use DeepXDE for academic research, you are encouraged to cite the following paper:

    author  = {Lu, Lu and Meng, Xuhui and Mao, Zhiping and Karniadakis, George E.},
    title   = {{DeepXDE}: A deep learning library for solving differential equations},
    journal = {arXiv preprint arXiv:1907.04502},
    year    = {2019}

Why this logo, ℒ?

The art of Scientific Machine Learning with deep learning is to design Loss ℒ.

Contributing to DeepXDE

First off, thanks for taking the time to contribute!

  • Reporting bugs. To report a bug, simply open an issue in the GitHub "Issues" section.
  • Suggesting enhancements. To submit an enhancement suggestion for DeepXDE, including completely new features and minor improvements to existing functionality, let us know by opening an issue.
  • Pull requests. If you made improvements to DeepXDE, fixed a bug, or had a new example, feel free to send us a pull-request.
  • Questions. To get help on how to use DeepXDE or its functionalities, you can as well open an issue.


Apache license 2.0

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for DeepXDE, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size DeepXDE-0.4.0-py2-none-any.whl (54.6 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size DeepXDE-0.4.0.tar.gz (40.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page