1
1
from jax import numpy as jnp , random , jit
2
- from ngcsimlib .context import Context
3
2
import numpy as np
4
3
np .random .seed (42 )
5
4
from ngclearn .components import ExponentialSynapse
6
- from ngcsimlib .compilers import compile_command , wrap_command
7
- from numpy .testing import assert_array_equal
8
5
9
6
from ngcsimlib .compilers .process import Process
10
7
from ngcsimlib .context import Context
@@ -19,13 +16,10 @@ def test_exponentialSynapse1():
19
16
## excitatory properties
20
17
tau_syn = 2.
21
18
E_rest = 0.
22
- ## inhibitory properties
23
- #tau_syn = 5.
24
- #E_rest = -80.
25
19
# ---- build a single exp-synapse system ----
26
20
with Context (name ) as ctx :
27
21
a = ExponentialSynapse (
28
- name = "a" , shape = (1 ,1 ), tau_syn = tau_syn , g_syn_bar = 2.4 , syn_rest = E_rest , weight_init = dist .constant (value = 1. ),
22
+ name = "a" , shape = (1 ,1 ), tau_decay = tau_syn , g_syn_bar = 2.4 , syn_rest = E_rest , weight_init = dist .constant (value = 1. ),
29
23
key = subkeys [0 ]
30
24
)
31
25
@@ -50,8 +44,8 @@ def test_exponentialSynapse1():
50
44
a .inputs .set (in_pulse )
51
45
a .v .set (post_syn_neuron_volt )
52
46
ctx .run (t = t * dt , dt = dt )
53
- print ("g: " ,a .g_syn .value )
54
- print ("i: " , a .i_syn .value )
47
+ # print("g: ",a.g_syn.value)
48
+ # print("i: ", a.i_syn.value)
55
49
outs .append (a .outputs .value )
56
50
outs = jnp .concatenate (outs , axis = 1 )
57
51
#print(outs)
0 commit comments