|
3 | 3 | import jax |
4 | 4 |
|
5 | 5 | from brainpy import math as bm, check |
6 | | -from brainpy._src.delay import Delay, VariDelay, DataDelay, DelayAccess |
| 6 | +from brainpy._src.delay import Delay, VarDelay, DataDelay, DelayAccess |
7 | 7 | from brainpy._src.dynsys import DynamicalSystem, Projection, Dynamic, Sequential |
8 | 8 | from brainpy._src.mixin import JointType, ParamDescInit, ReturnInfo, AutoDelaySupp, BindCondData, AlignPost |
9 | 9 |
|
@@ -54,7 +54,7 @@ def update(self): |
54 | 54 |
|
55 | 55 | def _init_delay(info: Union[bm.Variable, ReturnInfo]) -> Delay: |
56 | 56 | if isinstance(info, bm.Variable): |
57 | | - return VariDelay(info) |
| 57 | + return VarDelay(info) |
58 | 58 | elif isinstance(info, ReturnInfo): |
59 | 59 | if isinstance(info.batch_or_mode, int): |
60 | 60 | shape = (info.batch_or_mode,) + tuple(info.size) |
@@ -106,7 +106,7 @@ def __init__(self): |
106 | 106 | super().__init__() |
107 | 107 | self.N = bp.dyn.LifRef(4000, V_rest=-60., V_th=-50., V_reset=-60., tau=20., tau_ref=5., |
108 | 108 | V_initializer=bp.init.Normal(-55., 2.)) |
109 | | - self.delay = bp.VariableDelay(self.N.spike, entries={'I': None}) |
| 109 | + self.delay = bp.VarDelay(self.N.spike, entries={'I': None}) |
110 | 110 | self.syn1 = bp.dyn.Expon(size=3200, tau=5.) |
111 | 111 | self.syn2 = bp.dyn.Expon(size=800, tau=10.) |
112 | 112 | self.E = bp.dyn.VanillaProj(comm=bp.dnn.EventJitFPHomoLinear(3200, 4000, prob=0.02, weight=0.6), |
@@ -180,7 +180,7 @@ def __init__(self): |
180 | 180 | super().__init__() |
181 | 181 | self.N = bp.dyn.LifRef(4000, V_rest=-60., V_th=-50., V_reset=-60., tau=20., tau_ref=5., |
182 | 182 | V_initializer=bp.init.Normal(-55., 2.)) |
183 | | - self.delay = bp.VariableDelay(self.N.spike, entries={'I': None}) |
| 183 | + self.delay = bp.VarDelay(self.N.spike, entries={'I': None}) |
184 | 184 | self.E = bp.dyn.ProjAlignPostMg1(comm=bp.dnn.EventJitFPHomoLinear(3200, 4000, prob=0.02, weight=0.6), |
185 | 185 | syn=bp.dyn.Expon.desc(size=4000, tau=5.), |
186 | 186 | out=bp.dyn.COBA.desc(E=0.), |
@@ -374,7 +374,7 @@ def __init__(self): |
374 | 374 | super().__init__() |
375 | 375 | self.N = bp.dyn.LifRef(4000, V_rest=-60., V_th=-50., V_reset=-60., tau=20., tau_ref=5., |
376 | 376 | V_initializer=bp.init.Normal(-55., 2.)) |
377 | | - self.delay = bp.VariableDelay(self.N.spike, entries={'I': None}) |
| 377 | + self.delay = bp.VarDelay(self.N.spike, entries={'I': None}) |
378 | 378 | self.E = bp.dyn.ProjAlignPost1(comm=bp.dnn.EventJitFPHomoLinear(3200, 4000, prob=0.02, weight=0.6), |
379 | 379 | syn=bp.dyn.Expon(size=4000, tau=5.), |
380 | 380 | out=bp.dyn.COBA(E=0.), |
|
0 commit comments