11from jax import numpy as jnp , random , jit
2- from ngcsimlib .context import Context
32import numpy as np
43np .random .seed (42 )
54from ngclearn .components import ExponentialSynapse
6- from ngcsimlib .compilers import compile_command , wrap_command
7- from numpy .testing import assert_array_equal
85
96from ngcsimlib .compilers .process import Process
107from ngcsimlib .context import Context
@@ -19,13 +16,10 @@ def test_exponentialSynapse1():
1916 ## excitatory properties
2017 tau_syn = 2.
2118 E_rest = 0.
22- ## inhibitory properties
23- #tau_syn = 5.
24- #E_rest = -80.
2519 # ---- build a single exp-synapse system ----
2620 with Context (name ) as ctx :
2721 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. ),
2923 key = subkeys [0 ]
3024 )
3125
@@ -50,8 +44,8 @@ def test_exponentialSynapse1():
5044 a .inputs .set (in_pulse )
5145 a .v .set (post_syn_neuron_volt )
5246 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)
5549 outs .append (a .outputs .value )
5650 outs = jnp .concatenate (outs , axis = 1 )
5751 #print(outs)
0 commit comments