spikingjelly icon indicating copy to clipboard operation
spikingjelly copied to clipboard

SLAYER Algorithm

Open AiladReb opened this issue 2 years ago • 4 comments

I have checked the documentation and I realized that many surrogate functions exist. My question is, is there anyway to have the one used by SLAYER https://arxiv.org/pdf/1810.08646.pdf ?

AiladReb avatar May 10 '22 21:05 AiladReb

image https://spikingjelly.readthedocs.io/zh_CN/latest/spikingjelly.clock_driven.surrogate.html#piecewiseexp-init-en

I suggest to set alpha=2.

fangwei123456 avatar May 11 '22 01:05 fangwei123456

Thank you for your answer. However, I believe that by doing this it's not going to distribute the credit of error back in time as SLAYER does.

image

AiladReb avatar May 11 '22 09:05 AiladReb

https://github.com/bamsumit/slayerPytorch/blob/e29ca09e543783a0db18f1e9454c769080601859/src/slayer.py#L862

fangwei123456 avatar May 11 '22 09:05 fangwei123456

Surrogate gradient just handles the non-differentiable gradient of spike w.r.t. potential. It can be coupled with different learning (credit assignment) rules like STBP or SLAYER.

Yanqi-Chen avatar May 11 '22 09:05 Yanqi-Chen