Skip to main content

Deep learning library for learning Green's functions

Project description


Documentation Status

GreenLearning is a deep learning library based on Tensorflow for learning Green's functions associated with partial differential operators.

Exact and learned Green’s function of the Laplace operator..

Below is an example of the Green's function of a second-order differential operator with variable coefficients learned by GreenLearning.

Learned Green’s function of a second order ODE with variable coefficients.

See for more examples.

The library is maintained by Nicolas Boullé. If you are interested in using it, do not hesitate to get in contact with him at

Documentation: ReadTheDocs


  • GreenLearning learns Green's functions and homogeneous solutions associated with scalar and systems of linearized partial differential equations in 1D and 2D with deep learning.
  • Rational neural networks are implemented and used to increase the accuracy of the learned Green's functions.
  • GreenLearning requires no hyperparameter tuning to successfully learn Green's functions.
  • The neural networks can be created and trained easily with a few lines of code.
  • It is simple to generate the training datasets with MATLAB scripts.



GreenLearning relies on the following Python libraries:

How to install GreenLearning

  • For users, you can install the stable version with pip:
pip install greenlearning

or with conda:

conda install -c conda-forge greenlearning
  • For developers, you should clone the GitHub repository and install it manually on your machine::
git clone
cd greenlearning
pip install -e.


Please cite the following papers if you are using GreenLearning.

  • About GreenLearning:
title={Data-driven discovery of physical laws with human-understandable deep learning},
author={Boull{\'e}, Nicolas and Earls, Christopher J. and Townsend, Alex,
journal={arXiv preprint arXiv:},
  • About Rational neural networks:
title={Rational neural networks},
author={Boull{\'e}, Nicolas and Nakatsukasa, Yuji and Townsend, Alex},
booktitle = {Advances in Neural Information Processing Systems},
volume = {33},
pages = {14243--14253},
url = {}

Project details

Release history Release notifications | RSS feed

This version


Download files

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

Source Distribution (29.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page