Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for input synapses #250

Merged
merged 3 commits into from
Oct 24, 2019
Merged

Add test for input synapses #250

merged 3 commits into from
Oct 24, 2019

Conversation

tbekolay
Copy link
Member

@tbekolay tbekolay commented Oct 9, 2019

This adds the test described in #63, with some additional filtering (Nengo Loihi drifts a little bit over time) and with an assertion at the end.

It's based on #247, which should be merged first.

As this just adds a test, I don't believe it needs a changelog entry.

This is the test from #63 with additional filtering because
Nengo Loihi drifts a little bit over time.

Addresses #63.
Copy link
Member

@drasmuss drasmuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

plt.plot(t, sim_filt, label="nengo_loihi")
plt.legend(loc="best")
plt.twinx()
plt.plot(t, sim.data[p_stim], c="k")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have this plot handy to upload here? Could be useful in the future to know what you mean about the weird effects at the end.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't, but the weird effects are basically that Nengo Loihi's decoded value drops toward zero in the last 50 or so ms of the simulation, regardless of the length of the simulation. I didn't look into it much detail to know why.

@@ -707,7 +707,9 @@ def test_conv_split(Simulator, rng, plt, allclose):

@pytest.mark.skipif(nengo_transforms is None, reason="Requires new nengo.transforms")
def test_conv_preslice(Simulator, plt):
from nengo._vendor.npconv2d.conv2d import conv2d
from nengo._vendor.npconv2d.conv2d import ( # pylint: disable=import-outside-toplevel
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would just turn these into a pytest.importorskip, then remove the skipif

@drasmuss drasmuss merged commit 2abff99 into master Oct 24, 2019
@drasmuss drasmuss deleted the input-syn-test branch October 24, 2019 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants