The current implementation of SNNTorch version 0.7.0 does not set the membrane potential (mem) as an attribute of the neuron classes (Leaky, Synaptic, etc...) unless the neuron is initialized with the option init_hidden=True. As a result, any hooks that attempt to register the pre- and post-membrane potentials will fail if this option is not enabled.
This pull request resolves this issue by ensuring that the mem attribute is properly set when the init_hidden=True option is used. Additionally, it updates the necessary documentation to guide users on correctly configuring their networks if they need to register membrane potential updates.
The current implementation of SNNTorch version 0.7.0 does not set the membrane potential (mem) as an attribute of the neuron classes (Leaky, Synaptic, etc...) unless the neuron is initialized with the option
init_hidden=True
. As a result, any hooks that attempt to register the pre- and post-membrane potentials will fail if this option is not enabled.This pull request resolves this issue by ensuring that the
mem
attribute is properly set when theinit_hidden=True
option is used. Additionally, it updates the necessary documentation to guide users on correctly configuring their networks if they need to register membrane potential updates.