Recurrent neural network training in Python
Project description
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
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.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rectipy-0.4.0.tar.gz.
File metadata
- Download URL: rectipy-0.4.0.tar.gz
- Upload date:
- Size: 30.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
044afcc582d64265527337850bd4ce35b80abaca126835aa124b873bce71c268
|
|
| MD5 |
985d7d4902be0b4532a0d141ae2b3677
|
|
| BLAKE2b-256 |
c000372a306e67783ca3416d5bfd8fba6ec0eeb318efb69c2f264b6d2f2d61a5
|
File details
Details for the file rectipy-0.4.0-py3-none-any.whl.
File metadata
- Download URL: rectipy-0.4.0-py3-none-any.whl
- Upload date:
- Size: 35.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3d9e8c370a82a27c30237617d487ed9e3a23f1569c702cb7aa6d44c959653e3
|
|
| MD5 |
6ae49358f59ef83f5c162949dbf1b052
|
|
| BLAKE2b-256 |
1fbde55f98e15405ff083fdb89d681c0fddf8058da08ad22da24e3caf298fde0
|