Skip to content

workaround for BlockShape in nengo-loihi 0.10.0 #302

@monttj

Description

@monttj

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions