From fe95783c1bbd525b97430cacbe6fbb0aa12493fa Mon Sep 17 00:00:00 2001 From: chaoming Date: Fri, 22 Apr 2022 15:54:04 +0800 Subject: [PATCH] fix bugs on NMDA synapses --- brainpy/dyn/synapses/abstract_models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/brainpy/dyn/synapses/abstract_models.py b/brainpy/dyn/synapses/abstract_models.py index b279c1766..74f99255a 100644 --- a/brainpy/dyn/synapses/abstract_models.py +++ b/brainpy/dyn/synapses/abstract_models.py @@ -1227,8 +1227,9 @@ def update(self, _t, _dt): post_g = bm.sum(self.g) if not self.conn.include_self: post_g = post_g - self.g + post_g = post_g * self.g_max else: - post_g = self.g * self.g_max + post_g = self.g @ self.g_max elif isinstance(self.conn, One2One): post_g = self.g_max * self.g else: @@ -1242,4 +1243,4 @@ def update(self, _t, _dt): # output g_inf = 1 + self.cc_Mg / self.beta * bm.exp(-self.alpha * self.post.V) - self.post.input -= post_g * (self.post.V - self.E) / g_inf + self.post.input += post_g * (self.E - self.post.V) / g_inf