RectiPy
Recurrent neural network training in Python (RectiPy) is a software package developed by Richard Gast
that allows for lightweight implementations of recurrent neural networks (RNNs) based on ordinary or delayed
differential equations.
RectiPy provides an intuitive YAML interface for model definition, and leverages PyRates
to translate these model definitions into PyTorch functions.
This way, users can easily define their own neuron models, spike-based or rate-based, and use them to create a RNN model.
All model training, testing, as well as numerical integration of the differential equations is also performed in PyTorch.
Thus, RectiPy comes with all the gradient-based optimization and parallelization features that PyTorch provides.
Basic Features
1. Model definition
- RNN layers are defined via ordinary or delayed differential equations that govern the neuron dynamics
- neurons can either be rate neurons or spiking neurons
- RNN layers can either be defined via
YAMLtemplates (see documentation of PyRates for a detailed documentation of theYAML-based model definition) or via customPyTorchmodules. - linear input and output layers can be added, thus connecting the RNN into a layered neural network
2. Model training and testing
- input and output weights, as well as any parameters of the RNN layers can be trained
autogradfunctions byPyTorchare used for the parameter optimization- most loss functions and optimization algorithms implemented in
PyTorchare available
3. Model outputs
- record any RNN state variable, loss, or model outputs via the
Observerclass - choose at which rate to sample your recordings
- visualize for recordings via lightweight plotting functions
- connect the
RectiPynetwork to larger deep learning architectures
Installation
Stable release (PyPi)
You can install the most recent stable version of RectiPy via the pip command.
To this end, execute the following command via the terminal within the Python environment you would like to install RectiPy in:
pip install rectipy
This will also install the dependencies of the software listed below.
Development version (github)
To install the most recent development version of RectiPy as available on the master branch, clone this repository and run the
following line from the directory in which the repository was cloned:
python setup.py install
Again, this will also install the dependencies of the software listed below.
Dependencies
- torch
- pyrates
- numpy
- matplotlib
Documentation
You can find a detailed documentation and various use examples at our readthedocs website.
References
If you use this framework, please cite:
Contact
If you have any questions, want to contribute to the software, or just get in touch, feel free to post an issue or contact Richard Gast.
Metadata
Release files for rectipy 0.12.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rectipy-0.12.2.tar.gz | 44.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rectipy-0.12.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 94.5 kB
Release files / rectipy-0.12.2.tar.gz
| Download URL | rectipy-0.12.2.tar.gz |
|---|---|
| Size | 44.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44429ca0fa1fdffb886f7a1399c9590cf2f8d3a2fe590a9dec686898f16331b0
|
|
BLAKE2b-256 checksum How to use checksums |
bcc219a6597ee0758e8b0fcc87c975438868640994068885be9f8ee6a2d28148
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|
Release files / rectipy-0.12.2-py3-none-any.whl
| Download URL | rectipy-0.12.2-py3-none-any.whl |
|---|---|
| Size | 49.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
923020e196400285bdb1c4fe4444c9acc4e0c592957c12e32cd7e2800470cee3
|
|
BLAKE2b-256 checksum How to use checksums |
606d95d66a0ed12643563ee74e6a08446409e5e9b5dfc9f804e5a9faa626719c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|