File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
ngclearn/components/synapses/hebbian Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1+ # %%
2+
13from jax import random , numpy as jnp , jit
24from functools import partial
35from 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 )
You can’t perform that action at this time.
0 commit comments