Running Keras Model on Loihi Backend

I am trying to replicate the Keras to SNN on Loihi example on INRC. I am able to successfully run the MNIST model with RectifiedLinear() and SpikingRectifiedLinear() simulations, but when I try to use LoihiSpikingRectifiedLinear()ā€¦

run_network(
activation=nengo_loihi.neurons.LoihiSpikingRectifiedLinear(),
scale_firing_rates=100,
synapse=0.005,
)

ā€¦ I get this error:

I am using the following versions of software:
Nengo 3.1.0.dev0
NengoDL 3.3.0.dev0
NengoLoihi 0.11.0.dev0
Python 3.5.2
NxSDK 0.9.0

What could be causing this error? Could it be the versioning of the Nengo tools? I upgraded to development versions in order to have the BlockShape functionality.

Thanks!

Kyle

Hi Kyle, welcome to the forum!

I believe this is an issue with versions. NengLoihi is lagging behind Nengo and NengoDL development by a fair bit. Can you try using Nengo 3.0 and NengoDL 3.2.0 and see if that works? You can stay on the development version of NengoLoihi, since you want access to BlockShape.

You can either uninstall nengo and nengo-dl, then pip install nengo==3.0.0 nengo-dl==3.2.0, or you can go to your local nengo folder and git checkout v3.0.0 and go to the nengo-dl folder and git checkout v3.2.0 (Iā€™m assuming you installed them with pip install -e).

1 Like

Yes that worked! I had originally tested with nengo-dl==3.3.0 (which did not work), but 3.2.0 did the trick.

Thank you very much for your assistance,

Kyle

1 Like