1: Input : Poisson-distributed input spike train (inputs), Dropout ratio (p), Total number of time steps (#timesteps), Membrane potential (Vmem), Time constant of membrane potential (τm), Firing threshold (Vth) |
2: Initialize
|
3: // Define the random subset of units (with a probability 1 − p) at each iteration |
4: for
l ← 1 to #SNN.layer − 1 do
|
5: maskl ← generate_random_subset(probability = 1 − p) |
6: for t ← 1 to #timesteps
do
|
7: // Set input of first layer equal to spike train of a mini-batch data |
8: SNN1.spike[t] ← inputs[t]; |
9: for
l ← 2 to #SNN.layer
do
|
10: // Integrate weighted sum of input spikes to membrane potential |
11: -p)); |
12: // If Vmem is greater than Vth, post-neuron generate a spike |
13: if
then
|
14: // Membrane potential resets if the corresponding neuron fires a spike |
15: SNNl.spike[t] ← 1 |
16:
|
17: else
|
18: // Else, membrane potential decays over time |
19: SNNl.spike[t] ← 0 |
20:
|