-
Notifications
You must be signed in to change notification settings - Fork 332
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
Inconsistency about refractory period with Brian Simulator #137
Comments
Good point. How would you fix this? Feel free to open a PR. |
Since there is a definition of t in network/init, one possible way is to add t as an additional argument to step function. Inside the step function, introduce new variable to store spiking time (say t_spike). Everytime step function is called, check if t-t_spike is greater than refractory period and do operation accordingly. |
Hm, that could be problematic when doing multiple simulations in sequence. For example:
Alternatively, one could just reverse the ordering, from:
to
Does this make sense? Does this appear to solve the problem? |
Yes, that will be better than my solution. |
You may need to be careful when changing order. There are models (like this) that do self.refrac_count == 0 more than once. |
Solved by #136. |
In my opinion, implementation of refractory period in Brian Simulation makes more sense.
Assume refrac_period = 1
Ref:
https://github.com/Hananel-Hazan/bindsnet/blob/6d4a7a7980080556c79c34d2a603bada12dc78d0/bindsnet/network/nodes.py#L324-L334
Ref:
https://github.com/brian-team/brian2/blob/2b8e459798bd84be1c01e707d74993f2f260b5ce/brian2/groups/neurongroup.py#L121
The text was updated successfully, but these errors were encountered: