#269269th of 433 in ML frameworks and libraries
snntorch
PyTorch library for training spiking neural networks with surrogate gradients
Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.
Watch puts snntorch on your watch list: its new releases and known problems since your last visit. Kept in this browser, no account.snntorch is on your watch list. Its new releases and problems show there.
- Stars
- 2.1k
- License
- MIT
- Last commit
- Oct 2026
- Last release
- Mar 2024
- Language
- Python
1,938 on 28 Apr 20262,111 on 24 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
snnTorch extends PyTorch with spiking neuron models such as Leaky integrate-and-fire, used as activation layers inside nn.Sequential-style networks. It provides surrogate gradient functions, spike encoding, spike-aware loss and weight init, plotting, and import/export to other SNN libraries through NIR. Neurons are implemented as recursive functions, so membrane potential traces need not be stored for gradients.
Who it is for: Researchers and engineers training spiking neural networks in PyTorch
Strengths
- Spiking neurons drop into PyTorch models alongside conv, linear and residual layers
- Includes surrogate gradients, spike encoding, loss functions and weight init in one package
- NIR import and export for moving networks to other SNN libraries
- Seven tutorial notebooks plus advanced ones, with Colab links
Weaknesses
- Last tagged release is 2024-03-17, well behind recent commits
- Requires a separately installed, version-matched PyTorch for CUDA
- Research-oriented; no deployment or neuromorphic hardware runtime included
- NIR features need extra packages (nir, nirtorch); plotting needs matplotlib
What it needs
- GPU optional
- Needs PyTorch, numpy, pandas, nir>=1.0.6 (optional), nirtorch>=2.0.5 (optional), matplotlib (optional)
- Models: Leaky integrate-and-fire neurons, 2nd order spiking neurons, recurrent LIF neurons, NIR import/export
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS
Also in ML frameworks and libraries
See all 433| Rank | Project | Score |
|---|---|---|
| #267 | probabilityProbabilistic modeling and Bayesian inference library for TensorFlow and JAX | 47 out of 100 |
| #268 | open3d-ml3D point cloud segmentation and detection models for PyTorch and TensorFlow | 47 out of 100 |
| #270 | scikit-legoExtra scikit-learn transformers, metrics and models, including fairness tools | 47 out of 100 |
| #271 | rl_gamesPyTorch PPO and SAC trainer for GPU-vectorized robotics simulators | 47 out of 100 |
| #272 | dlpackCommon in-memory tensor struct for sharing tensors between ML frameworks | 47 out of 100 |