GeNN  2.2.3
GPU enhanced Neuronal Networks (GeNN)
experiment.h
Go to the documentation of this file.
1 /*--------------------------------------------------------------------------
2  Author: Alan Diamond
3 
4  initial version: 2014-Mar-05
5 
6 --------------------------------------------------------------------------
7 
8 Header file containing global variables, constants and macros used in running the Schmuker_2014_classifier.
9 
10 -------------------------------------------------------------------------- */
11 
12 #ifdef _WIN32
13 #define divi "\\"
14 #else
15 #define divi "/"
16 #endif
17 
18 typedef unsigned int UINT;
19 
20 //pseudo random generator used in synapseFnct.cc and synapseKrnl.cc.
21 #define D_MAX_RANDOM_NUM 32767
22 //#define RAND(Y,X) Y = Y * 1103515245 +12345;X= (unsigned int)(Y >> 16) & D_MAX_RANDOM_NUM
23 
24 /*--------------------------------------------------------------------------
25 //Experiment constants
26  --------------------------------------------------------------------------*/
27 #define RECORDINGS_DIR "recordings_iris_data"
28 #define CACHE_DIR "cached_iris_data"
29 #define OUTPUT_DIR "output_iris"
30 #define VR_DATA_FILENAME "VR-recordings-iris.data"
31 #define DATASET_NAME "Iris"
32 
33 #define TOTAL_RECORDINGS 150 //How many sets of sensor readings will be presented
34 #define N_FOLDING 5 //e.g. five fold folding of training vs test data -> 80:20 split
35 #define RECORDING_TIME_MS 1000 //How long is each recording in ms
36 #define REPEAT_LEARNING_SET 2 //Repeat the learning set N times, for more exposure to early observations
37 
38 //learning parameters
39 #define SPIKING_ACTIVITY_THRESHOLD_HZ 5 // if rate greater than threshold (set to 35 sp/s in the paper) then we can expect this neuron response to its VR contributed to winning class cluster
40 
41 //switchable flags
42 //#define FLAG_GENERATE_RASTER_PLOT 1
43 //#define DEVICE_MEM_ALLOCATED_ON_DEVICE 1 //set this for GeNN 1.0 compatibility
44 #define FLAG_RUN_ON_CPU 1
45 
46 
47 /*--------------------------------------------------------------------------
48 Data and extra network dimensions (see also Model file)
49  --------------------------------------------------------------------------*/
50 
51 //this range is used to scale the input data into firing rates (Hz)
52 #define MAX_FIRING_RATE_HZ 70 //Hz
53 #define MIN_FIRING_RATE_HZ 20 //Hz
54 
55 
56 // weight and connectivity prob between an RN cluster and corresponding PN cluster
57 #define GLOBAL_WEIGHT_SCALING 1.0 //0.375 //Use this to tune absolute weight levels to neuron models. Relative weights are taken from Schmuker paper
58 #define WEIGHT_RN_PN 0.5
59 #define CONNECTIVITY_RN_PN 0.5
60 
61 //#define WEIGHT_WTA_PN_PN 0.7 * 0.133 // paper uses an intermediate LN population PN-LN 0.7, LN-PN 0.133
62 //#define WEIGHT_WTA_AN_AN 0.5 * 1.0 // paper uses an intermediate adjoint inhibitory population PN-AI 0.5, AI-PN 1.0
63 #define WEIGHT_WTA_PN_PN 0.01
64 #define WEIGHT_WTA_AN_AN 0.01
65 
66 
67 #define CONNECTIVITY_PN_PN 0.5 // connectivity between a PN cluster and neurons in other clusters
68 #define CONNECTIVITY_AN_AN 0.5 // connectivity between an AN cluster and neurons in other clusters
69 
70 // weight and connectivity prob between PN and AN populations
71 #define CONNECTIVITY_PN_AN 0.5 //50% connectivity between PN and AN
72 #define MIN_WEIGHT_PN_AN 0.1 //0.2
73 #define MAX_WEIGHT_PN_AN 0.4 //0.66
74 #define WEIGHT_DELTA_PN_AN 0.04 //increment/decrement of plastic synapse weights
75 #define PLASTICITY_INTERVAL_MS 330 //how often to update the plastic synapse weights
76 
77 using namespace std;
78 #include <cassert>
79 #include "hr_time.h"
80 #include "utils.h" // for CHECK_CUDA_ERRORS
81 //#include <cuda_runtime.h>
82 
83 /*--------------------------------------------------------------------------
84 global variables
85 --------------------------------------------------------------------------*/
86 
88 
89 
90 //--------------------------------------------------------------------------
Definition: hr_time.h:39
CStopWatch timer
Definition: experiment.h:87
This file contains standard utility functions provide within the NVIDIA CUDA software development too...
This header file contains the definition of the CStopWatch class that implements a simple timing tool...
unsigned int UINT
Definition: experiment.h:18