hxtorch.spiking.functional.li
Leaky-integrate neurons
Classes
|
Unterjubel hardware observables to allow correct gradient flow |
Functions
-
hxtorch.spiking.functional.li.
cuba_li_integration
(input: torch.Tensor, *, leak: torch.Tensor, tau_syn: torch.Tensor, tau_mem: torch.Tensor, hw_data: Optional[torch.Tensor] = None, dt: float = 1e-06) → torch.Tensor Leaky-integrate neuron integration for realization of readout neurons with exponential synapses. Integrates according to:
v^{t+1} = dt / au_{mem} * (v_l - v^t + i^t) + v^t i^{t+1} = i^t * (1 - dt / au_{syn}) + x^t
Assumes i^0, v^0 = 0. :note: One dt synaptic delay between input and output
- Parameters
input – Input graded spike tensor of shape (batch, time, neurons).
leak – The leak voltage as torch.Tensor.
tau_syn – The synaptic time constant as torch.Tensor.
tau_mem – The membrane time constant as torch.Tensor.
hw_data – An optional tuple holding optional hardware observables in the order (None, membrane_cadc, membrane_madc).
dt – Integration step width
- Returns
Returns the membrane trace in shape (batch, time, neurons).