torchdyn
A PyTorch library entirely dedicated to neural differential equations, implicit models and related numerical methods
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org, ieee.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.2%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A PyTorch library entirely dedicated to neural differential equations, implicit models and related numerical methods
Basic Info
- Host: GitHub
- Owner: DiffEqML
- License: apache-2.0
- Language: Jupyter Notebook
- Default Branch: master
- Homepage: https://torchdyn.org
- Size: 33.3 MB
Statistics
- Stars: 1,519
- Watchers: 29
- Forks: 134
- Open Issues: 40
- Releases: 14
Topics
Metadata Files
README.md
Quick Start
Torchdyn provides utilities and layers to easily construct numerical deep learning models. For example, neural differential equations:
``` from torchdyn.core import NeuralODE
your preferred torch.nn.Module here
f = nn.Sequential(nn.Conv2d(1, 32, 3), nn.Softplus(), nn.Conv2d(32, 1, 3) )
nde = NeuralODE(f) ```
And you have a trainable model. Feel free to combine Torchdyn classes with any PyTorch modules to build composite models. We offer additional tools to build custom neural differential equation and implicit models, including a functional API for numerical methods. There is much more in Torchdyn other than NeuralODE and NeuralSDE classes: tutorials, a functional API to a variety of GPU-compatible numerical methods and benchmarks.
Contribute to the library with your benchmark, tasks and numerical deep learning utilities! No need to reinvent the wheel :)
Installation
Stable release:
pip install torchdyn
Alternatively, you can build a virtual dev environment for torchdyn with poetry, following the steps outlined in Contributing.
Documentation
Check our docs for more information.
Introduction
Interest in the blend of differential equations, deep learning and dynamical systems has been reignited by recent works [1,2, 3, 4]. Modern deep learning frameworks such as PyTorch, coupled with further improvements in computational resources have allowed the continuous version of neural networks, with proposals dating back to the 80s [5], to finally come to life and provide a novel perspective on classical machine learning problems.
We explore how differentiable programming can unlock the effectiveness of deep learning to accelerate progress across scientific domains, including control, fluid dynamics and in general prediction of complex dynamical systems. Conversely, we focus on models powered by numerical methods and signal processing to advance the state of AI in classical domains such as vision of natural language.
By providing a centralized, easy-to-access collection of model templates, tutorial and application notebooks, we hope to speed-up research in this area and ultimately establish neural differential equations and implicit models as an effective tool for control, system identification and general machine learning tasks.
Dependencies
torchdyn leverages modern PyTorch best practices and handles training with pytorch-lightning [6]. We build Graph Neural ODEs utilizing the Graph Neural Networks (GNNs) API of dgl [7]. For a complete list of references, check pyproject.toml. We offer a complete suite of ODE solvers and sensitivity methods, extending the functionality offered by torchdiffeq [1]. We have light dependencies on torchsde [7] and torchcde [8].
Applications and tutorials
torchdyn contains a variety of self-contained quickstart examples / tutorials built for practitioners and researchers. Refer to the tutorial readme
Contribute
torchdyn is designed to be a community effort: we welcome all contributions of tutorials, model variants, numerical methods and applications related to continuous and implicit deep learning. We do not have specific style requirements, though we subscribe to many of Jeremy Howard's ideas.
We use poetry to manage requirements, virtual python environment creation, and packaging. To install poetry, refer to the docs.
To set up your dev environment, run poetry install. In example, poetry run pytest will then run all torchdyn tests inside your newly created env.
poetry does not currently offer a way to select torch wheels based on desired cuda and OS, and will install a version without GPU support. For CUDA torch wheels,
run poetry run poe autoinstall-torch-cuda, that will automatically install PyTorch based on your CUDA configuration.
If you wish to run jupyter notebooks within your newly created poetry environments, use poetry run ipython kernel install --user --name=torchdyn and switch the notebook kernel.
Choosing what to work on: There is always ongoing work on new features, tests and tutorials. If you wish to work on additional features not currently WIP, feel free to reach out on Slack or via email. We'll be glad to discuss details.
Cite us
If you find Torchdyn valuable for your research or applied projects:
@article{politorchdyn,
title={TorchDyn: Implicit Models and Neural Numerical Methods in PyTorch},
author={Poli, Michael and Massaroli, Stefano and Yamashita, Atsushi and Asama, Hajime and Park, Jinkyoo and Ermon, Stefano}
}
Owner
- Name: DiffeqML
- Login: DiffEqML
- Kind: organization
- Twitter: Diffeq_ml
- Repositories: 12
- Profile: https://github.com/DiffEqML
Research group for the intersection of deep learning, systems, numerics and signal processing.
GitHub Events
Total
- Issues event: 2
- Watch event: 115
- Issue comment event: 1
- Pull request event: 1
- Fork event: 8
Last Year
- Issues event: 2
- Watch event: 115
- Issue comment event: 1
- Pull request event: 1
- Fork event: 8
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Zymrael | 3****l | 294 |
| Stefano Massaroli | m****o@g****m | 127 |
| archis | j****a | 23 |
| Federico Berto | b****2@g****m | 17 |
| Alex Tong | a****v@g****m | 10 |
| Clayton Rabideau | c****u@g****m | 10 |
| Raahul Singh | r****l@p****i | 8 |
| Zdenek Hynek | z****k@s****m | 6 |
| JuanKo96 | j****o@y****r | 5 |
| Ronan Gautier | r****r@g****m | 4 |
| Jared Callaham | j****m@g****m | 2 |
| Raahul Singh | r****2@g****m | 2 |
| Chris DeGrendele | 3****e | 1 |
| Deniz Etkar | d****r@g****m | 1 |
| Gary Mirams | g****s@g****m | 1 |
| Ibraheem Moosa | i****7@g****m | 1 |
| Joseph Viviano | j****h@v****a | 1 |
| LM | l****7@g****m | 1 |
| Matthew LeMay | m****y | 1 |
| Peter Whidden | a****o@g****m | 1 |
| Sayantan Das | 3****s | 1 |
| Vishnu Raj | g****u@y****m | 1 |
| baeseongsu | s****4@g****m | 1 |
| joschkabraun | 4****n | 1 |
| junyoungpark | j****k@k****r | 1 |
| qpwodlsqp | q****p@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 9 months ago
All Time
- Total issues: 74
- Total pull requests: 51
- Average time to close issues: 3 months
- Average time to close pull requests: about 2 months
- Total issue authors: 51
- Total pull request authors: 20
- Average comments per issue: 2.08
- Average comments per pull request: 0.9
- Merged pull requests: 38
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 2
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 2
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Zymrael (9)
- atong01 (5)
- bigyaan (3)
- alokwarey (2)
- Charlie-Xiaoqi (2)
- Bawaw (2)
- cyx96 (2)
- nprasadmm (2)
- StephenHogg (2)
- MaxH1996 (2)
- jcallaham (2)
- pharringtonp19 (2)
- agoryuno (1)
- Wang-Tianyu (1)
- nstlz (1)
Pull Request Authors
- joglekara (10)
- Zymrael (10)
- atong01 (5)
- fedebotu (5)
- jcallaham (4)
- stefanosIoannou (2)
- varunagrawal (2)
- massastrello (2)
- amorehead (2)
- Ubiquinone-dot (2)
- ibraheem-moosa (1)
- emptymalei (1)
- denizetkar (1)
- gautierronan (1)
- JuanKo96 (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- ipykernel *
- matplotlib *
- myst_parser *
- nbsphinx *
- papermill *
- pytest *
- pytest-cov *
- pytorch-lightning *
- readthedocs-sphinx-search *
- scipy *
- sklearn *
- sphinx *
- sphinx_autodoc_typehints *
- sphinx_rtd_theme *
- torch *
- torchcde *
- torchsde *
- torchvision *
- papermill * develop
- poethepoet ^0.10.0 develop
- pytest * develop
- pytest-cov * develop
- ipykernel *
- ipywidgets *
- matplotlib *
- poethepoet ^0.10.0
- python ^3.7
- pytorch-lightning *
- scipy *
- sklearn *
- torch ^1.8.1
- torchcde ^0.2.3
- torchsde *
- torchvision *
- matplotlib *
- pytorch-lightning >=0.8.4
- scikit-learn *
- torch >=1.6.0
- torchcde >=0.2.3
- torchsde >=0.2.5
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- codecov/codecov-action v3.1.1 composite
- snok/install-poetry v1 composite
- actions/checkout v3 composite
- actions/setup-python v3 composite