Dengyu-Wu / spkeras

Conversion from CNNs to SNNs using Tensorflow-Keras
MIT License
36 stars 8 forks source link

How the conversion process takes place ? #6

Closed sauravtii closed 1 year ago

sauravtii commented 2 years ago

Hi, I have used SpKeras for a couple of applications, but still I am not sure of the conversion process from a CNN to SNN. I did refer this code, but wasn't able to get any satisfactory insights. So, can anyone help me on this ?

Dengyu-Wu commented 2 years ago

Hi sauravtii,

For the conversion, you can learn the basic ideas from our paper, which explains the importance of the maximum value of activation in each layer and thresholding mechanism. For the code, it is mainly based on two functions, "convert" for inserting&removing layer and "findlambda" for finding the maximum value for each ReLU layer. You can try to go through the paper and these two functions, and see if they may help.