Skip to content

Commit 5a58b87

Browse files
committed
update hebbian synapse
1 parent 1ac6f2c commit 5a58b87

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ngclearn/components/synapses/hebbian/hebbianSynapse.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# %%
2+
13
from jax import random, numpy as jnp, jit
24
from functools import partial
35
from ngclearn.utils.optim import get_opt_init_fn, get_opt_step_fn
@@ -297,11 +299,11 @@ def help(cls): ## component help function
297299
return info
298300

299301
def __repr__(self):
300-
comps = [varname for varname in dir(self) if Compartment.is_compartment(getattr(self, varname))]
302+
comps = [varname for varname in dir(self) if isinstance(getattr(self, varname), Compartment)]
301303
maxlen = max(len(c) for c in comps) + 5
302304
lines = f"[{self.__class__.__name__}] PATH: {self.name}\n"
303305
for c in comps:
304-
stats = tensorstats(getattr(self, c).value)
306+
stats = tensorstats(getattr(self, c).get())
305307
if stats is not None:
306308
line = [f"{k}: {v}" for k, v in stats.items()]
307309
line = ", ".join(line)

0 commit comments

Comments
 (0)