Learning Partial Differential Equations
Project description
Learning Partial Differential Equations
INSTALLATION
By way of pip:
pip install lpde
By way of source
git clone https://github.com/fkemeth/lpde
cd lpde
pip install .
USAGE
This python package contains functions to learn partial differential equations (PDE) from data.
-
The main components consists of a neural network PDE class
Network(torch.nn.Module)
. To create an instance of this class, one needs to pass a config dictionary that specifieskernel_size
: The width of the finite difference stencil used to calculate input spatial derivativesn_derivs
: The number of derivatives used in the PDE modeldevice
: Either 'cpu' or 'cudause_param
: Boolean that specifiesnum_params
: Ifuse_param
is True, then here the number of parameters that change have to be specified.n_filters
: The number of neurons in each layer of the PDE model.n_layers
: The number of layers of the PDE model.
In addition, the number of system variables
n_var
has to be provided -
Furthermore, a model wrapper to train and evaluate the neural network PDE is provided as a
Model
class. To create an instance of this class, one needs to providedataloader_train
: A pytorch dataloader with the training datadataloader_val
: A pytorch dataloader with the validation datanetwork
: A Network instance, as described aboveconfig
: A config dictionary containinglr
: The initial learning ratepatience
: The patience used for the learning rate schedulerreduce_factor
: - The factor by which the learning rate is reduced when loss does not decreaseweight_decay
: - Weight decay factor for regularization
path
: String to the directory where the trained model shall be saved
See this GitHub repository for example usages.
ISSUES
For questions, please contact (felix@kemeth.de), or visit the GitHub repository.
LICENCE
This work is licenced under MIT License. Please cite
"Learning emergent partial differential equations in a learned emergent space" F.P. Kemeth et al. (https://arxiv.org/abs/2012.12738)
if you use this package for publications.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lpde-0.0.2.tar.gz
.
File metadata
- Download URL: lpde-0.0.2.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26e7d9de6a11634a8e63058073a70d45938f54681db6c3ebfbb6ce76df6785bf |
|
MD5 | cdbe81fcb899145675d698e0403b04b0 |
|
BLAKE2b-256 | 64446bd5a5c6b397370d061a27d592a134d56ab1381fec01cc883929762736a4 |
File details
Details for the file lpde-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: lpde-0.0.2-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd297f158ba2230e1fe6492def2942ec7fa95aef943a4ece1424f17dffba0db4 |
|
MD5 | bd07e6fc88f69605d6e241c32693cf67 |
|
BLAKE2b-256 | b1d32c0abe2755396c0d5e67319c7354ab70e60616f105ad0c6eef5b2ad8d038 |