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

Refactor block.py #270

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Refactor block.py #270

wants to merge 7 commits into from

Conversation

tbekolay
Copy link
Member

In #261 I had some questions about why a spike is None condition was necessary. In investigating that, I started refactoring Axon to reduce the number of ways you could misuse it, as currently it requires you to construct it, then set the target outside of the Axon constructor, and then call set_compartment_axon_map, and if you don't do one of those steps it will either fail or give you undocumented behavior.

While I was able to alleviate those concerns, when I tired to remove the possibility of returning None instead of a spike it became obvious that several classes inside block.py have similar assumptions, and so several unit tests were failing (despite many integration tests passing). This made me think that there are likely several more issues in how the classes in block.py are designed versus how they are actually used in Nengo Loihi, and that seemed outside of the scope of the original issue, so I stopped there. We can pick up this refactoring later if we want.

hunse and others added 7 commits January 22, 2020 10:51
For population connections, these dummy axons were still having
an effect. The synapses associated with these axons cause index
errors in the NxSDK axon compiler, so those are removed as well.

Fixes the "invalid index" error raised in #246.
This allows population spikes to be sent from host to chip
when `precompute=True`.

Also add spikes to spike generator more quickly by doing
deobfuscation once only per group of spikes.

Co-authored-by: Eric Hunsberger <[email protected]>
We were accidentally returning the Loihi weights, due to double usage
of the term `weights`. This is now less ambiguous.
We avoid the restriction of the axon compartment bases being less
than 256, by taking any part of the required offset over this
and adding it into the indices instead.

Also clarified the `conv2d_loihi_weights` function.

Also remove nengo-dl from `test_conv.py:test_conv_connection`. The
nengo-dl portions have not been run in a long time, since they
were only enabled if `channels_last=True`, and we were x-failing
the test for `channels_last=True` due to lack of nengo-loihi
support. It contributes nothing to testing nengo-loihi, so remove it.
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.

3 participants