Hello Marcel
Thanks very much for answering.
I had wrote another question but in the end I deleted it because there was some initialization problem.
If it is not too time demanding for you, I just want to make sure I did write it the good way, here is my piece of code, I'm not sure about it (the things in bold)
eqs_rcn = '''
dS_rnd/dt = -S_rnd/RndSynapseTau :1
G_rnd = S_rnd + bias :1
rate_rnd = 0.4*(1+tanh(fI_slope*G_rnd-3))/RndSynapseTau :Hz
sumw :1
'''
taupre = taupost = 20*ms
Apre = 0.01
Apost = -Apre*taupre/taupost*1.05
wmin=0
wmax=0.01
stdp_rcn_rcn = '''
w : 1
dapre/dt = -apre/taupre : 1 (event-driven)
dapost/dt = -apost/taupost : 1 (event-driven)
sumw_post = w : 1 (summed)
'''
# defines what happens when a presynaptic spike arrives at a synapse
on_pre_rcn_rcn = '''
S_rnd+=w
apre += Apre
w = clip(w+apost, wmin, wmax)
w=w/sumw_post
'''
# code that should be executed whenever a postsynaptic spike occurs
on_post_rcn_rcn = '''
apost += Apost
w = clip(w+apre, wmin, wmax)
w=w/sumw_post
'''
with
RCN_pool = NeuronGroup(N_rnd, eqs_rcn, threshold='rand()<rate_rnd*dt')
RCN_pool.S_rnd = 'InitSynapseRange*rand()'
and
Rec_RCN_RCN = Synapses(RCN_pool,RCN_pool, model=stdp_rcn_rcn, on_pre=on_pre_rcn_rcn, on_post= on_post_rcn_rcn)
Rec_RCN_RCN.connect()
Rec_RCN_RCN.w = 'rand() * wmax'
this RCN populations being connected to other 'sensory' populations without any learning.
Would you write it like that too ? I just want to normalize all the weights of all incoming synapses to one neuron. However if I had also some null weights, how would I write a condition in order to normalize only when the sum is non zero in on_pre and on_post pieces of code ?
Thank you very much
Best
Flora