Skip to content

Commit

Permalink
Test conv weights without lowpass
Browse files Browse the repository at this point in the history
  • Loading branch information
arvoelke committed Apr 4, 2019
1 parent 0ca11d8 commit 6c201e0
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions nengo_loihi/tests/test_conv.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,3 +654,26 @@ def test_conv_gain(Simulator):
with pytest.raises(ValidationError):
with Simulator(net):
pass


def test_conv_non_lowpass(Simulator):
k = 10
d = 5
with nengo.Network() as model:
a = nengo.Ensemble(n_neurons=k**2, dimensions=k)

x = nengo.Ensemble(n_neurons=d, dimensions=d,
gain=np.ones(d), bias=np.ones(d))

conv = nengo.Convolution(
n_filters=d, input_shape=(k, k, 1),
strides=(1, 1), kernel_size=(k, k))
assert conv.size_in == k**2
assert conv.size_out == d

nengo.Connection(a.neurons, x.neurons, transform=conv,
synapse=nengo.Alpha(0.005))

with pytest.raises(NotImplementedError, match="non-Lowpass synapses"):
with Simulator(model):
pass

0 comments on commit 6c201e0

Please sign in to comment.