Fix to input_type node of CubaLIF neurons#107
Fix to input_type node of CubaLIF neurons#107DylanMuir wants to merge 3 commits intoneuromorphs:mainfrom
input_type node of CubaLIF neurons#107Conversation
|
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 |
|
Can this be merged @stevenabreu7 ? 🧟 :) |
CubaLIFneurons would have aninput_typenode 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.