You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -33,74 +33,55 @@ purposes and are opened and closed without warning.
33
33
34
34
### Installing GeNN
35
35
36
-
Installing GeNN comprises a few simple steps [^1] to create the GeNN
37
-
development environment:
38
-
39
-
[^1]: While GeNN models are normally simulated using CUDA on NVIDIA GPUs, if you want to use GeNN on a machine without an NVIDIA GPU, you can skip steps v and vi and use GeNN in "CPU_ONLY" mode.
40
-
41
-
1. If you have downloaded a zip file, unpack GeNN.zip in a convenient
42
-
location. Otherwise enter the directory where you downloaded the Git
43
-
repository.
44
-
45
-
2. Add GeNN's 'bin' directory to your path, e.g. if you are running Linux or Mac OS X and extracted/downloaded GeNN to
46
-
``$HOME/GeNN``, this can be done with:
47
-
```bash
48
-
export PATH=$PATH:$HOME/GeNN/bin
49
-
```
50
-
to make this change persistent, this can be added to your login script (e.g. `.profile` or `.bashrc`) using your favourite text editor or with:
If you are using Windows, the easiest way to modify the path is
55
-
by using the 'Environment variables' GUI, which can be accessed by clicking start and searching for
56
-
(by starting to type) 'Edit environment variables for your account'.
57
-
In the upper 'User variables' section, scroll down until you see 'Path',
58
-
selectit and click 'Edit'.
59
-
Now add a new directory to the path by clicking 'New'in the 'Edit environment variable' window e.g.:
60
-

61
-
if GeNN is installed in a sub-directory of your home directory (``%USERPROFILE%`` is an environment variable which points to the current user's home directory) called ``genn``.
62
-
63
-
3. Install the C++ compiler on the machine, if not already present.
64
-
For Windows, download Microsoft Visual Studio Community Edition from
At the moment, the following C++ example projects are provided with GeNN:
162
-
163
-
- Self-organisation with STDP in the locust olfactory system \([Nowotny et al. 2005][@Nowotnyetal2005]\):
164
-
- with all-to-all connectivity, using built-in neuron and synapse models \(for benchmarks see [Yavuz et al. 2016][@Yavuzetal2016]\)
165
-
- with sparse connectivity for some synapses, using user-defined neuron-and synapse models \(for benchmarks see [Yavuz et al. 2016][@Yavuzetal2016]\)
166
-
- using BITMASK connectivity
167
-
- using synapses with axonal delays
168
-
- Pulse-coupled network of Izhikevich neurons \([Izhikevich 2003][@Izhikevich2003]\) (for benchmarks see [Yavuz et al. 2016][@Yavuzetal2016])
169
-
170
-
- Genetic algorithm fortracking parametersin a Hodgkin-Huxley model cell
171
-
172
-
- Classifier based on an abstraction of the insect olfactory system \([Schmuker et al. 2014][@Schmukeretal2014]\)
142
+
At the moment, the following Python example projects are provided with GeNN:
173
143
174
144
- Cortical microcircuit model \([Potjans et al. 2014][@Potjans2014]\)
145
+
- SuperSpike model \([Zenke et al. 2018][@Zenke2018]\)
146
+
- MNIST classifier using an insect-inspired mushroom body model
175
147
176
-
- Toy examples:
177
-
- Single neuron population of Izhikevich neuron(s) receiving Poisson spike trains as input
178
-
- Single neuron population of Izhikevich neuron(s) with no synapses
179
-
- Network of Izhikevich neurons with delayed synapses
180
-
181
-
In order to get a quick start and run one of the the provided example models, navigate to one of the example project directories in the userproject sub-directory, and then follow the instructions in the README file contained within.
182
-
183
-
## Simulating a new model
184
-
185
-
The sample projects listed above are already quite highly integrated examples. If you wanted to use GeNN to develop a new C++ model, you would do the following:
186
-
187
-
1. The neuronal network of interest is defined in a model definition file,
188
-
e.g. ``Example1.cc``.
189
-
190
-
2. Within the the model definition file ``Example1.cc``, the following tasks
191
-
need to be completed:
192
-
193
-
1. The GeNN file ``modelSpec.h`` needs to be included,
194
-
```c++
195
-
#include "modelSpec.h"
196
-
```
197
-
198
-
2. The values for initial variables and parameters for neuron and synapse
would define the (homogeneous) parameters for a population of Poisson
205
-
neurons [^2].
206
-
[^2]: The number of required parameters and their meaning is defined by the
207
-
neuron or synapse type. Refer to the [User manual](https://genn-team.github.io/genn/documentation/4/html/dc/d05/UserManual.html) for details. We recommend, however, to use comments like
208
-
in the above example to achieve maximal clarity of each parameter's
209
-
meaning.
210
-
211
-
If heterogeneous parameter values are required for a particular
212
-
population of neurons (or synapses), they need to be defined as "variables"
213
-
rather than parameters. See the [User manual](https://genn-team.github.io/genn/documentation/4/html/dc/d05/UserManual.html) for how to define new neuron (or synapse) types and the [Variable initialisation](https://genn-team.github.io/genn/documentation/4/html/d4/dc6/sectVariableInitialisation.html) section for more information on
214
-
initialising these variables to hetererogenous values.
215
-
216
-
3. The actual network needs to be defined in the form of a function
217
-
``modelDefinition`` [^3], i.e.
218
-
```c++
219
-
void modelDefinition(ModelSpec &model);
220
-
```
221
-
[^3]: The name ``modelDefinition`` and its parameter of type ``ModelSpec&``
222
-
are fixed and cannot be changed if GeNN is to recognize it as a
223
-
model definition.
224
-
225
-
4. Inside ``modelDefinition()``, The time step ``DT`` needs to be defined, e.g.
226
-
```c++
227
-
model.setDT(0.1);
228
-
```
229
-
\note
230
-
All provided examples and pre-defined model elements in GeNN work with
231
-
units of mV, ms, nF and uS. However, the choice of units is entirely
232
-
left to the user if custom model elements are used.
233
-
234
-
[MBody1.cc](userproject/MBody1_project/model/MBody1.cc) shows a typical example of a model definition function. In
235
-
its core it contains calls to ``ModelSpec::addNeuronPopulation`` and
236
-
``ModelSpec::addSynapsePopulation`` to build up the network. For a full range
237
-
of options for defining a network, refer to the [User manual](https://genn-team.github.io/genn/documentation/4/html/dc/d05/UserManual.html).
238
-
239
-
3. The programmer defines their own "simulation" code similar to
240
-
the code in [MBody1Sim.cc](userproject/MBody1_project/model/MBody1Sim.cc). In this code,
241
-
242
-
1. They can manually define the connectivity matrices between neuron groups.
243
-
Refer to the \ref subsect34 section for the required format of
244
-
connectivity matrices for dense or sparse connectivities.
245
-
246
-
2. They can define input patterns or individual initial values for neuron and
247
-
/ or synapse variables.
248
-
\note
249
-
The initial values or initialisation "snippets" given in the ``modelDefinition`` are automatically applied.
250
-
251
-
3. They use ``stepTime()`` to run one time step on either the CPU or GPU depending on the options passed to genn-buildmodel.
252
-
253
-
4. They use functions like ``copyStateFromDevice()`` etc to transfer the
254
-
results from GPU calculations to the main memory of the host computer
255
-
for further processing.
256
-
257
-
5. They analyze the results. In the most simple case this could just be
258
-
writing the relevant data to output files.
148
+
In order to get a quick start and run one of the the provided example models, navigate to the userproject directory, and run the python script with ``--help`` to see what options are available.
259
149
260
150
For more details on how to use GeNN, please see [documentation](http://genn-team.github.io/genn/).
261
151
262
-
If you use GeNN in your work, please cite "Yavuz, E., Turner, J. and Nowotny, T. GeNN: a code generation framework for accelerated brain simulations. Scientific Reports, 6. (2016)"
263
-
264
-
265
-
[@Izhikevich2003]: https://doi.org/10.1109/TNN.2003.820440 "Izhikevich, E. M. Simple model of spiking neurons. IEEE transactions on neural networks 14, 1569–1572 (2003)"
266
-
267
-
[@Nowotnyetal2005]: https://doi.org/10.1007/s00422-005-0019-7 "Nowotny, T., Huerta, R., Abarbanel, H. D. & Rabinovich, M. I. Self-organization in the olfactory system: one shot odor recognition in insects. Biological cybernetics 93, 436–446 (2005)"
268
-
269
152
[@Potjans2014]: https://doi.org/10.1093/cercor/bhs358"Potjans, T. C., & Diesmann, M. The Cell-Type Specific Cortical Microcircuit: Relating Structure and Activity in a Full-Scale Spiking Network Model. Cerebral Cortex, 24(3), 785–806 (2014)"
270
-
271
-
[@Schmukeretal2014]: https://doi.org/10.1073/pnas.1303053111 "Schmuker, M., Pfeil, T. and Nawrot, M.P. A neuromorphic network for generic multivariate data classification. Proceedings of the National Academy of Sciences, 111(6), pp.2081-2086 (2014)"
272
-
273
-
[@Yavuzetal2016]: https://doi.org/10.1038%2Fsrep18854 "Yavuz, E., Turner, J. and Nowotny, T. GeNN: a code generation framework for accelerated brain simulations. Scientific reports, 6. (2016)"
153
+
[@Zenke2018]: https://doi.org/10.1162/neco_a_01086"Zenke, F., & Ganguli, S. (2018). SuperSpike: Supervised Learning in Multilayer Spiking Neural Networks. Neural Computation, 30(6), 1514–1541."
0 commit comments