ngclearn.components.other package

Submodules

ngclearn.components.other.expKernel module

class ngclearn.components.other.expKernel.ExpKernel(*args, **kwargs)[source]

Bases: JaxComponent

A spiking function based on an exponential kernel applied to a moving window of spike times.

— Cell Input Compartments: —
inputs - input (takes in external signals)
— Cell State Compartments: —
tf - maintained local window of pulse signals
— Cell Output Compartments: —
epsp - excitatory postsynaptic potential/pulse
Parameters:
  • name – the string name of this operator

  • n_units – number of calculating entities or units

  • dt – integration time constant (the kernel needs access to this value)

  • nu – (ms, spike time interval for window)

  • tau_w – spike window time constant (in micro-secs, or nano-s)

  • batch_size – batch size dimension of this cell (Default: 1)

advance_state(t)[source]
classmethod help()[source]
reset()[source]

ngclearn.components.other.varTrace module

class ngclearn.components.other.varTrace.VarTrace(*args, **kwargs)[source]

Bases: JaxComponent

A variable trace (filter) functional node.

— Cell Input Compartments: —
inputs - input (takes in external signals)
— Cell State Compartments: —
trace - traced value signal
— Cell Output Compartments: —
outputs - output signal (same as “trace” compartment)
trace - traced value signal (can be treated as output compartment)
Parameters:
  • name – the string name of this operator

  • n_units – number of calculating entities or units

  • tau_tr – trace time constant (in milliseconds, or ms)

  • a_delta – value to increment a trace by in presence of a spike; note if set to a value <= 0, then a piecewise gated trace will be used instead

  • P_scale – if a_delta=0, then this scales the value that the trace snaps to upon receiving a pulse value

  • gamma_tr – an extra multiplier in front of the leak of the trace (Default: 1)

  • decay_type

    string indicating the decay type to be applied to ODE integration; low-pass filter configuration

    Note:

    string values that this can be (Default: “exp”) are: 1) ‘lin’ = linear trace filter, i.e., decay = x_tr + (-x_tr) * (dt/tau_tr); 2) ‘exp’ = exponential trace filter, i.e., decay = exp(-dt/tau_tr) * x_tr; 3) ‘step’ = step trace, i.e., decay = 0 (a pulse applied upon input value)

  • n_nearest_spikes – (k) if k > 0, this makes the trace act like a nearest-neighbor trace, i.e., k = 1 yields the 1-nearest (neighbor) trace (Default: 0)

  • batch_size – batch size dimension of this cell (Default: 1)

advance_state(dt)[source]
classmethod help()[source]
reset()[source]

Module contents