This repository is the official implementation of Unifying Activation- and Timing-based Learning Rules for Spiking Neural Networks (NeurIPS 2020)
with anaconda :
git clone https://github.com/KyungsuKim42/ANTLR.git
cd ANTLR
conda env create -f requirements.yml
conda activate antlr
Will be automatically downloaded when needed.
- Download N-MNIST dataset and put it in ANTLR/dataset/N-MNIST
- unzip
Train.zip
,Test.zip
. The path should beANTLR/dataset/N-MNIST/Train
andANTLR/dataset/N-MNIST/Test
. - Run
python preprocess_nmnist.py
(This process may take a while.)
To train the model, run main.py
. For example, to train the network with mnist dataset and learning rate of 0.0001, run following command.
python main.py --task <mnist or nmnist> --tag <tag for logging> --learning-rate 0.0001
Default values of each arguments are specified in main.py
To evaluate the trained model on the test dataset, enable evaluation mode as follows:
python main.py --tag <tag of the model you want to evaluate> --eval-mode