engine.neuron.spiking
Spiking neurons emit all-or-none events once their numeric state surpasses a critical threshold.
Spiking neurons inherit all properties of their parent class Neuron
. In addition to voltage,
they also own the binary integer tensor spiked, which maintains their emitted action potentials.
- class engine.neuron.spiking.SpikingNeuron(**kwargs)
Generic spiking neuron.
Defines instance attributes shared by all derived spiking neuron classes.
- Parameters:
spiked (Tensor) – A binary representation of spike events, registered as a PyTorch buffer.
- forward(data: Tensor) dict
Processes an input, updates the state of this component, and advances the simulation by one step.
- Parameters:
data (Tensor) – Input to be processed (e.g., added to a neuron’s numeric state tensor voltage).
- Returns:
A dictionary whose keys are loggable attributes and whose values are their states as of this time step. For potential use by a
SimpleSimulator
or any otherPipeline
script handling runtime operations.- Return type:
dict
- Raises:
NotImplementedError – The forward method must be implemented by each derived class.
Modules
Izhikevich neuron model (IZ). |
|
Leaky Integrate-and-Fire neuron model (LIF). |