Skip to content

Commit

Permalink
builder.py: Added comments on filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
hunse committed Sep 13, 2018
1 parent fcd2073 commit 8313af2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nengo_loihi/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ def build_ensemble(model, ens):
group.bias[:] = bias
model.build(ens.neuron_type, ens.neurons, group)

# set default filter just in case no other filter gets set
group.configure_filter(INTER_TAU, dt=model.dt, default=True)

if ens.noise is not None:
Expand Down Expand Up @@ -465,7 +466,7 @@ def build_connection(model, conn):
transform = get_samples(
conn.transform, conn.size_out, d=conn.size_mid, rng=rng)

tau_s = 0.0
tau_s = 0.0 # `synapse is None` gets mapped to `tau_s = 0.0`
if isinstance(conn.synapse, nengo.synapses.Lowpass):
tau_s = conn.synapse.tau
elif conn.synapse is not None:
Expand Down Expand Up @@ -575,6 +576,7 @@ def build_connection(model, conn):
weights2 = 0.5 * gain * np.vstack([weights,
-weights] * INTER_N).T

# use tau_s for filter into interneurons, and INTER_TAU for filter out
dec_cx.configure_filter(tau_s, dt=model.dt)
post_tau = INTER_TAU

Expand Down

0 comments on commit 8313af2

Please sign in to comment.