Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in Synaptic neuron forward function [solved] #350

Open
Roiwa opened this issue Oct 22, 2024 · 0 comments
Open

Bug in Synaptic neuron forward function [solved] #350

Roiwa opened this issue Oct 22, 2024 · 0 comments

Comments

@Roiwa
Copy link

Roiwa commented Oct 22, 2024

  • snntorch version: 0.9.1
  • Python version: 3.12.3
  • Operating System: Ubuntu x64

Description

During tutorial 4, I have found that Synaptic neuron model does not simulate correctly the expected behaviour. When passing the syn and mem value in the function call, lif1(spk_in[step], syn, mem), both values tend to infinity. Also, I ran the code that SNNTorch has for google colab and found the same issue.

What I Did

When reviewing the Synaptic code, I observed that when passing the syn and mem parameters the forward function overrides the syn attribute (self.syn) with the mem value instead of the syn value, we can see this behaviour in lines 218-219:

if not syn == None:
            self.syn = mem

So, I change this line with the following statement and the bug is removed.

if not syn == None:
            self.syn = syn
@Roiwa Roiwa changed the title Bug in Synaptic neuron forward function Bug in Synaptic neuron forward function [solved] Oct 22, 2024
@Roiwa Roiwa changed the title Bug in Synaptic neuron forward function [solved] Bug in Synaptic neuron forward function Oct 22, 2024
@Roiwa Roiwa changed the title Bug in Synaptic neuron forward function Bug in Synaptic neuron forward function [solved] Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant