calix.spiking.neuron_threshold.NeuronThresholdCalib
-
class
calix.spiking.neuron_threshold.
NeuronThresholdCalib
(safe_margin: int = 40) Bases:
calix.spiking.neuron_threshold._SpikeCounterCalib
Calibrate the spike threshold of all neurons to be slightly above the resting potential, such that even small inputs can trigger spikes.
During calibration, a low spike rate is desired, indicating the spike threshold roughly matching the resting potential. After a spike, the membrane potential is set as low as possible, and the next spike should only happen after multiple membrane time constants.
To prevent self-induced spiking (without excitatory input), the spike threshold is increased by a safe_margin after calibration. In this state, a single input of medium weight should trigger spikes in most neurons, while most neurons should not spike on their own. Decreasing the safe_margin allows smaller inputs to trigger spikes, at the cost of having more neurons spike without input.
Requirements: * The leak potential is currently set at the desired threshold
potential.
Caution: * The reset potential is set to the minimum after calibration.
- Variables
safe_margin – Amount to increase spike threshold after the calibration. Given in CapMem LSB. The default value of 40 seems to work for inputs of weight 32, for a hagen-mode-like calibration on HICANN-X v2.
-
__init__
(safe_margin: int = 40) Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
([safe_margin])Initialize self.
postlude
(connection)Increase parameters found during calibration by safe margin.
prelude
(connection)Configure neurons for easy spiking.
-
postlude
(connection: pyhxcomm_vx.ConnectionHandle) Increase parameters found during calibration by safe margin. Measure spikes for one second and log data for neurons which still spike frequently if safe_margin is at least 10 (otherwise we assume frequent spiking is expected).
- Parameters
connection – Connection to the chip to calibrate.
-
prelude
(connection: pyhxcomm_vx.ConnectionHandle) Configure neurons for easy spiking.
The membrane capacitance is set low to have a short membrane time constant and easily reach the leak potential after a reset. The reset potential is set to the minimum as it must be below the spike threshold, which is not yet known.
- Parameters
connection – Connection to the chip to configure.