Skip to content

h-z-h-cell/QCFS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

这个是我按照我的理解把每一步都添加了注释的版本

Optimal ANN-SNN Conversion for High-accuracy and Ultra-low-latency Spiking Neural Networks

Codes for Optimal ANN-SNN Conversion for High-accuracy and Ultra-low-latency Spiking Neural Networks

Usage

Please first change the variable "DIR" at File ".Preprocess\getdataloader.py", line 9 to your own dataset directory

Train model with QCFS-Layer

python main.py train --bs=BATACHSIZE --model={vgg16, resnet18} --data={cifar10, cifar100, imagenet} --id=YOUR_MODEL_NAME --l=QUANTIZATION_STEP

Test accuracy in ann mode or snn mode

python main.py test --bs=BATACHSIZE --model={vgg16, resnet18} --data={cifar10, cifar100, imagenet} --id=YOUR_MODEL_NAME --mode={ann, snn} --t=SIMULATION_TIME

One pretrained model at https://drive.google.com/file/d/1HL-ngCcRTqXw6L6XML-1RCL6dgP1GIDZ/view?usp=share_link

The paper in the openreview has a little problem with the derivative of $\lambda$ for the QCFS activation function, we will soon upadate an arxiv version and make a correction. Codes are always correct because of the autograd mechanism in pytorch.

About

QCFS(按照我的理解添加了注释的)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published