-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathempty_snn_pattern.py
49 lines (32 loc) · 1.39 KB
/
empty_snn_pattern.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import spynnaker8 as sim
"""
"""
# === Parameters ===============================================================
n_neurons = ? # number of neurons in each population for the Spiking Neural Network in this example
timestamp = ? # simulate the network with 1.0 ms time steps
sim_time = ? # total simulation time
# === Configure the simulator ==================================================
sim.setup( timestamp )
# === Build the network ========================================================
# Presynaptic population - Input layer - Stimuli
pop_input = sim.Population( n_neurons, ... , label = 'pop_input' )
# Postsynaptic population
pop_output = sim.Population( n_neurons, ..., label = 'pop_output' )
sim.Projection( pop_input,
pop_output,
connector = ?,
synapse_type = ?,
receptor_type = ?,
space = ?,
label = "? Projection"
)
# == Instrument the network ====================================================
# Record all to observe.
pop_output.record( "all" )
# === Run the simulation =======================================================
sim.run( sim_time )
# === Plot the results =========================================================
from util.basic_visualizer import *
plot( [pop_output] )
# === Clean up and quit ========================================================
sim.end()