-
Notifications
You must be signed in to change notification settings - Fork 11
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
Fix to input_type
node of CubaLIF
neurons
#107
base: main
Are you sure you want to change the base?
Conversation
Looks good to me, thanks for the PR @DylanMuir! Edit: actually, the |
Hi @stevenabreu7 , it occurred precisely when the neuron population contains 1 neuron. In other cases The alternative fix would be to ensure |
Explicitly, it occurred when exporting a net to nir from in
The line looks fine, but becomes a scalar numpy array, instead of a single-element vector. So I guess it's up to you whether to fix this in NIR or ask Jason for a fix ;) |
@stevenabreu7 @Jegp Any thoughts on how to proceed here? |
Thank you for following up on this! If I'm understanding this correctly, the scalar seems to be coming from snnTorch. But your addition, @DylanMuir, should work with both scalars and arrays alike, correct? In that case, I think it's an improvement compared to the previous version. Would you agree @stevenabreu7? Regarding the snnTorch codebase, I opened an issue here: jeshraghian/snntorch#334 |
Sorry about the delay.. As it is now, it breaks the types of 2D neuron populations. I pushed a simple change here to ensure that if v_threshold is scalar, it is cast into a numpy array, then we can also keep the |
PR for snnTorch is also up here: jeshraghian/snntorch#335 |
CubaLIF
neurons would have aninput_type
node of[]
, instead of[1]
, when created from a node with scalarv_threshold
. This pull request fixes this issue.Also adds a
squeeze()
to the rockpool RNN notebook.