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

Error with nn_quantiser.py #64

Open
ando2097 opened this issue Aug 4, 2021 · 1 comment
Open

Error with nn_quantiser.py #64

ando2097 opened this issue Aug 4, 2021 · 1 comment

Comments

@ando2097
Copy link

ando2097 commented Aug 4, 2021

issue

attempting to run the cmsisnn-cifar10 ML-example

command typed

python3 nn_quantizer.py --model models/cifar10_m4_train_test.prototxt --weights models/cifar10_m4_iter_70000.caffemodel.h5 --save models/cifar10_m4.pkl

error message

I0804 16:46:04.856118 22909 net.cpp:257] Network initialization done.
I0804 16:46:04.871187 22909 net.cpp:801] Ignoring source layer cifar
I0804 16:46:04.871275 22909 hdf5.cpp:33] Datatype class: H5T_FLOAT
Traceback (most recent call last):
File "nn_quantizer.py", line 614, in
my_model.get_graph_connectivity()
File "nn_quantizer.py", line 234, in get_graph_connectivity
for key, value in self.top_blob.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

@ando2097 ando2097 changed the title Error with Error with nn_quantiser.py Aug 4, 2021
@Burton2000
Copy link
Contributor

Hi there,

Think this is an issue with Python2 vs Python3. Python3 changed iteritems() to items() and unfortunately we have not updated this example yet. To fix it either use Python2 or replace iteritems() to items() in the code.

We have a plan to clean up the examples in this repository, so this will be on our radar to fix as well.

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

No branches or pull requests

2 participants