Skip to content

Commit 8d2a555

Browse files
committed
fix: fix the updating rules in the STP model
1 parent 9bb11a8 commit 8d2a555

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

brainpy/dyn/synapses/learning_rules.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ class STP(TwoEndConn):
2121
**Model Descriptions**
2222
2323
Short-term plasticity (STP) [1]_ [2]_ [3]_, also called dynamical synapses,
24-
refers to a phenomenon in which synaptic efficacy changes over time in a way
25-
that reflects the history of presynaptic activity. Two types of STP, with
26-
opposite effects on synaptic efficacy, have been observed in experiments.
27-
They are known as Short-Term Depression (STD) and Short-Term Facilitation (STF).
24+
refers to the changes of synaptic strengths over time in a way that reflects
25+
the history of presynaptic activity. Two types of STP, with opposite effects
26+
on synaptic efficacy, have been observed in experiments. They are known as
27+
Short-Term Depression (STD) and Short-Term Facilitation (STF).
2828
2929
In the model proposed by Tsodyks and Markram [4]_ [5]_, the STD effect is
3030
modeled by a normalized variable :math:`x (0 \le x \le 1)`, denoting the fraction
@@ -231,7 +231,7 @@ def update(self, _t, _dt):
231231
syn_sps = bm.pre2syn(self.pre.spike, self.pre_ids)
232232
u = bm.where(syn_sps, u + self.U * (1 - self.u), u)
233233
x = bm.where(syn_sps, x - u * self.x, x)
234-
self.I.value = bm.where(syn_sps, self.I, self.I + self.A * u * self.x)
234+
self.I.value = bm.where(syn_sps, self.I + self.A * u * self.x, self.I)
235235
self.u.value = u
236236
self.x.value = x
237237
if self.delay_type in ['homo', 'heter']:

0 commit comments

Comments
 (0)