Pb to quantize the network

hello,

I have a new computer with

  • ubuntu 18.04
  • carte nvidia geforce gtx 1080ti with gpu (driver 410.79)
  • cuda 10.0.130
  • python 3.6.7
  • caffe

and i try to follow your link : https://github.com/openmv/openmv/tree/master/ml/cmsisnn
to train a cifar 10 model

I am stopped at the step :
python3 /home/christophe/openmv/ml/cmsisnn/nn_quantizer.py --gpu --model /home/christophe/caffe/examples/cifar10/cifar10_full_train_test.prototxt --weights /home/christophe/caffe/examples/cifar10/cifar10_full_iter_70000.caffemodel.h5 --save /home/christophe/caffe/models/cifar10_full.pkl

with
Traceback (most recent call last):
File “/home/christophe/openmv/ml/cmsisnn/nn_quantizer.py”, line 608, in
my_model.get_graph_connectivity()
File “/home/christophe/openmv/ml/cmsisnn/nn_quantizer.py”, line 228, in get_graph_connectivity
for key, value in self.top_blob.iteritems():
AttributeError: ‘dict’ object has no attribute ‘iteritems’

Thanks for help,
model_and_prototxt.zip (329 KB)

Hi, will check tonight. Um, I trained on Ubuntu 16.04 as I was never able to install on Ubuntu 18.04.

Um, can you verify that all the steps up to that step succeeded? Like, when you trained the network did that work and we’re you able to test it and get the correct outputs? You’ll get weird errors like this if the net wasn’t actually built right.

Since I went through writing that document I can help you however.

Hi, I just ran through all the steps. Given I have limited time and you likely have more than me on this I’d like you to walk through my steps and confirm you got the same output or note where it diverges. Thanks,

The file attached is my terminal output. You can see the commands I execute and what they output.
log.txt (324 KB)

Dear,

I followed your log but my caffe was not in the same directory.
Then i change path in train.sh and test.sh to get them working.

My problem was simply because :

  • i did not compile caffe until the end (test, runtest and distribute)
  • i did not export pythonpath in the bashrc
  • i tried to use python3 in place of python2 to quantizer and convert
  • i missed python-skimage and protobuf lib

The next step is to test the mnist
Thanks,

Great, glad you got it working! Once you get over the first hurdle of install it becomes easy… That said, install is a nightmare. Pretty much par for the course with linux.

Hi, I’ve been getting the same error. Can you teach me how you fixed it?
I’m currently also running python3. When I run using python2, I get errors…