Spiking Neural Network Examples#
Start here for task-level SNN training and performance evaluation. The runnable scripts live in the repository’s examples directory.
Learning tasks#
000-lif-snn-for-nmnist.py trains a recurrent LIF-delta SNN on framed N-MNIST events. API: pp-prop.
001-gif-snn-for-dms.py trains a GIF recurrent SNN on delayed matching-to-sample. API: pp-prop.
002-coba-ei-rsnn.py trains an excitatory/inhibitory recurrent SNN on an evidence-accumulation task with configurable current- or conductance-based synapses. API: SignedWLinear.
004-feedforward-conv-snn.py builds a feed-forward convolutional SNN with online and BPTT trainers. API: Conv2d.
Performance examples#
These scripts compare time and memory under synthetic, batched-state, and
per-sample vmap execution:
003-snn-memory-and-speed-evaluation-all.py runs the complete comparison. API: D-RTRL.
003-snn-memory-and-speed-evaluation-batched.py uses batched state. API: compile.
003-snn-memory-and-speed-evaluation-vmap.py uses per-sample
vmapexecution. API: compile.
Use these scripts for implementation benchmarking, not as evidence that two algorithms have equivalent gradient accuracy.
Begin with the SNN Online Learning workflow before moving to dataset-scale scripts.