fangwei123456 / spikingjelly

SpikingJelly is an open-source deep learning framework for Spiking Neural Network (SNN) based on PyTorch.
https://spikingjelly.readthedocs.io
Other
1.35k stars 239 forks source link

Error in documentation in neuronal_reset ( english version) #57

Closed Thvnvtos closed 3 years ago

Thvnvtos commented 3 years ago

Hello, in https://spikingjelly.readthedocs.io/zh_CN/latest/clock_driven_en/0_neuron.html issue

The line should be : self.v = self.v - spike * self.v_threshold

tmasquelier commented 3 years ago

Hi Ilyass! I guess neuronal_reset() is only called when spike=1, so it wouldn't make any difference, would it?

fangwei123456 commented 3 years ago

Thanks! It is an error.

Hi Ilyass! I guess neuronal_reset() is only called when spike=1, so it wouldn't make any difference, would it?

Thanks for Tim's reply! This function will always be called after neuronal_fire and this function does an element-wise operation. When v_reset is None, the neuron will use soft reset, and v = v - v_threshold after firing a spike. So, I correct the doc. Fortunately, this error does not appear in neuron.py.