Skip to content

Intelligent-Computing-Lab-Yale/Visual-Explanations-from-Spiking-Neural-Networks-using-Interspike-Intervals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Visual-Explanations-from-Spiking-Neural-Networks-using-Interspike-Intervals

Kim, Y. & Panda, P., Visual explanations from spiking neural networks using inter-spike intervals. Sci Rep 11, 19037 (2021). https://doi.org/10.1038/s41598-021-98448-0

Prerequisites

  • Python 3.9
  • PyTorch 1.10.0
  • NVIDIA GPU (>= 12GB)
  • CUDA 10.2 (optional)

Getting Started

Conda Environment Setting

conda create -n VisualExp 
conda activate VisualExp
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch

Training and testing

Training

Testing (on pretrained model)

  • As a first step, download pretrained parameters (link) to PATH/TO/MODEL.pth.tar
  • The above pretrained model is for TinyImageNet / VGG11 architecture

  • Run the following command

python main.py --pretrainedmodel_pth 'PATH/TO/MODEL' --dataset_pth 'PATH/TO/DATASET' --target_layer 6
  • Heatmaps (across timesteps) are visualized in folder figuresave

  • In order to change the target images, please change the list in line 32.

    Example) visualize 10th and 52th images in TinyImageNet validation dataset.

img_nums = [10, 52]

Citation

Please consider citing our paper:

@article{kim2021visual,
 title={Visual explanations from spiking neural networks using interspike intervals},
 author={Kim, Youngeun and Panda, Priyadarshini},
 journal={arXiv preprint arXiv:2103.14441},
 year={2021}

About

Visual explanations from spiking neural networks using inter-spike intervals. Sci Rep 11, 19037 (2021).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages