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

Function BRIAN2

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

Source from the content-addressed store, hash-verified

78
79
80def BRIAN2(n_neurons, time):
81 t0 = t()
82
83 set_device("runtime", build_on_run=False)
84 defaultclock = 1.0 * ms
85 device.build()
86
87 t1 = t()
88
89 eqs_neurons = """
90 dv/dt = (ge * (-60 * mV) + (-74 * mV) - v) / (10 * ms) : volt
91 dge/dt = -ge / (5 * ms) : 1
92 """
93
94 input = PoissonGroup(n_neurons, rates=15 * Hz)
95 neurons = NeuronGroup(
96 n_neurons,
97 eqs_neurons,
98 threshold="v > (-54 * mV)",
99 reset="v = -60 * mV",
100 method="exact",
101 )
102 S = Synapses(input, neurons, """w: 1""")
103 S.connect()
104 S.w = "rand() * 0.01"
105
106 run(time * ms)
107
108 return t() - t0, t() - t1
109
110
111def BRIAN2GENN(n_neurons, time):

Callers

nothing calls this directly

Calls 1

runFunction · 0.85

Tested by

no test coverage detected