MCPcopy Create free account
hub / github.com/BindsNET/bindsnet / BRIAN2GENN

Function BRIAN2GENN

examples/benchmark/benchmark.py:111–142  ·  view source on GitHub ↗
(n_neurons, time)

Source from the content-addressed store, hash-verified

109
110
111def BRIAN2GENN(n_neurons, time):
112 t0 = t()
113
114 set_device("genn", build_on_run=False)
115 defaultclock = 1.0 * ms
116 device.build()
117
118 t1 = t()
119
120 eqs_neurons = """
121 dv/dt = (ge * (-60 * mV) + (-74 * mV) - v) / (10 * ms) : volt
122 dge/dt = -ge / (5 * ms) : 1
123 """
124
125 input = PoissonGroup(n_neurons, rates=15 * Hz)
126 neurons = NeuronGroup(
127 n_neurons,
128 eqs_neurons,
129 threshold="v > (-54 * mV)",
130 reset="v = -60 * mV",
131 method="exact",
132 )
133 S = Synapses(input, neurons, """w: 1""")
134 S.connect()
135 S.w = "rand() * 0.01"
136
137 run(time * ms)
138
139 device.reinit()
140 device.activate()
141
142 return t() - t0, t() - t1
143
144
145def PyNEST(n_neurons, time):

Callers

nothing calls this directly

Calls 1

runFunction · 0.85

Tested by

no test coverage detected