-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathparam.jl
More file actions
executable file
·152 lines (131 loc) · 3.6 KB
/
Copy pathparam.jl
File metadata and controls
executable file
·152 lines (131 loc) · 3.6 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
dt = 0.1 #simulation timestep (ms)
# training variables
nloop = 500; #300
penlambda = 0.05; # 0.1 or 0.5
penlamEE = 0.04; # 3.0
penlamEI = 0.04; # 3.0
penlamIE = 0.04; # 3.0
penlamII = 0.04; # 3.0
penlamFF = lam_list[jj];
penmu = 8.0; # 2.0
fracTrained = fracTrained_list[qq];
learn_every = 20.0
learn_step = Int(learn_every/dt)
# innate, train, test time
train_duration = 2000.;
stim_on = 800.;
stim_off = 1000.;
train_time = stim_off + train_duration;
Nsteps = Int(train_time/dt;)
# neuron param
taue = 10; #membrane time constant for exc. neurons (ms)
taui = 10;
threshe = 1.0 # spike threshold
threshi = 1.0
refrac = 0.1 # refractory period
vre = 0.0
#synaptic time constants (ms)
tauedecay = 3
tauidecay = 3
taudecay_plastic = 150.0
# network size
Ncells = 5000;
Ne = Int(Ncells*0.5);
Ni = Int(Ncells*0.5);
# connectivity
K = 500
pree = K/Ne
prei = K/Ne
prie = K/Ne
prii = K/Ne
sqrtK = sqrt(K)
# synaptic strength
g = 1.0 # 1.0, 1.5
je = 2.0 / sqrtK * taue * g
ji = 2.0 / sqrtK * taue * g
jx = 0.12 * sqrtK * g
jee = je*0.15
jie = je
jei = -ji*0.75
jii = -ji
muemin = jx*1.5 # exc external input
muemax = jx*1.5
muimin = jx # inh external input
muimax = jx
# # plastic weights
# L = round(Int,sqrt(K)*L_list[ll]) # number of exc/inh plastic weights per neuron
# Lexc = L # excitatory L
# Linh = L # inhibitory L
# wpscale = sqrtK * 0.5
L = round(Int,sqrt(K))*L_list[ll] # number of exc/inh plastic weights per neuron
Lffwd = Lffwd_list[oo] #round(Int, L/2) # feedfoward L/2
Lexc = L # excitatory L
Linh = L # inhibitory L
wpscale = sqrtK * L_list[ll] / 4.0
wpee = je * sqrtK / wpscale
wpie = je * sqrtK / wpscale
wpei = -ji * sqrtK / wpscale * (6.5/12.0) # initial network: exc rate = 6.5 Hz, inh rate = 12.0 Hz
wpii = -ji * sqrtK / wpscale * (6.5/12.0) # initial network: exc rate = 6.5 Hz, inh rate = 12.0 Hz
wpffwd = wpee * wpffwd_list[pp]
maxrate = 500 #(Hz) maximum average firing rate. if the average firing rate across the simulation for any neuron exceeds this value, some of that neuron's spikes will not be saved
mutable struct paramType
train_duration::Float64
nloop::Int64
penlambda::Float64
penlamEE::Float64
penlamEI::Float64
penlamIE::Float64
penlamII::Float64
penlamFF::Float64
penmu::Float64
fracTrained::Float64
learn_every::Float64
learn_step::Int64
stim_on::Float64
stim_off::Float64
train_time::Float64
dt::Float64
Nsteps::Int64
Ncells::Int64
Ne::Int64
Ni::Int64
pree::Float64
prei::Float64
prie::Float64
prii::Float64
taue::Float64
taui::Float64
K::Int64
sqrtK::Float64
L::Int64
Lffwd::Int64
Lexc::Int64
Linh::Int64
wpscale::Float64
je::Float64
ji::Float64
jx::Float64
jee::Float64
jei::Float64
jie::Float64
jii::Float64
wpee::Float64
wpei::Float64
wpie::Float64
wpii::Float64
wpffwd::Float64
muemin::Float64
muemax::Float64
muimin::Float64
muimax::Float64
vre::Float64
threshe::Float64
threshi::Float64
refrac::Float64
tauedecay::Float64
tauidecay::Float64
taudecay_plastic::Float64
maxrate::Float64
end
p = paramType(train_duration,nloop,penlambda,penlamEE,penlamEI,penlamIE,penlamII,penlamFF,penmu,fracTrained,learn_every,learn_step,stim_on,stim_off,train_time,dt,Nsteps,Ncells,Ne,Ni,pree,prei,prie,prii,taue,taui,K,sqrtK,L,Lffwd,Lexc,Linh,wpscale,
je,ji,jx,jee,jei,jie,jii,wpee,wpei,wpie,wpii,wpffwd,muemin,muemax,muimin,muimax,vre,threshe,threshi,refrac,tauedecay,tauidecay,taudecay_plastic,maxrate);