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

workaround for BlockShape in nengo-loihi 0.10.0 #302

Open
monttj opened this issue Nov 5, 2020 · 1 comment
Open

workaround for BlockShape in nengo-loihi 0.10.0 #302

monttj opened this issue Nov 5, 2020 · 1 comment

Comments

@monttj
Copy link

monttj commented Nov 5, 2020

Hello,

I am trying to follow the example in this page:
https://www.nengo.ai/nengo-loihi/examples/keras-to-loihi.html

When trying to change the shape using Blockshape (*),
I am facing some error message (**) below.
It seems that the version of nengo-loihi 0.10.0 does not have the function of BlockShape().

I am wondering if there is any workaround.

Thank you very much,

Taejeong

(*)

conv0_shape = conv0_layer.output_shape[1:]
net.config[
    nengo_converter.layers[conv0].ensemble
].block_shape = nengo_loihi.BlockShape((16, 16, 4), conv0_shape)

conv1_shape = conv1_layer.output_shape[1:]
net.config[
    nengo_converter.layers[conv1].ensemble
].block_shape = nengo_loihi.BlockShape((8, 8, 16), conv1_shape)

dense0_shape = dense0_layer.output_shape[1:]
net.config[
    nengo_converter.layers[dense0].ensemble
].block_shape = nengo_loihi.BlockShape((50,), dense0_shape)

(**)


AttributeError Traceback (most recent call last)
in
3 net.config[
4 nengo_converter.layers[conv0].ensemble
----> 5 ].block_shape = nengo_loihi.BlockShape((16, 16, 4), conv0_shape)
6
7 conv1_shape = conv1_layer.output_shape[1:]

AttributeError: module 'nengo_loihi' has no attribute 'BlockShape'

@hunse
Copy link
Collaborator

hunse commented Nov 6, 2020

Hi Taejeong,

Unfortunately, there's no workaround for block_shape in nengo-loihi 0.10.0. You'll have to use the development version of NengoLoihi. master branch should work with Nengo 3.0.0 and NxSDK <= 0.9.5. If you want to be bleeding-edge, you can try the nengomaster branch, which we haven't merged yet but is basically ready to go (it works with Nengo master branch and NxSDK up to 0.9.9).

Very soon we'll have a new release of Nengo (version 3.1.0), and then we'll do a release of NengoLoihi with the block_shape support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants