Pb to quantize the network

General discussion about topics related to OpenMV.
User avatar
chrisPyres66
Posts: 70
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Pb to quantize the network

Postby chrisPyres66 » Tue Jan 15, 2019 11:53 am

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 <module>
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,
Attachments
model_and_prototxt.zip
(328.64 KiB) Downloaded 50 times
User avatar
kwagyeman
Posts: 2713
Joined: Sun May 24, 2015 2:10 pm

Re: Pb to quantize the network

Postby kwagyeman » Tue Jan 15, 2019 2:16 pm

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.
Nyamekye,
User avatar
kwagyeman
Posts: 2713
Joined: Sun May 24, 2015 2:10 pm

Re: Pb to quantize the network

Postby kwagyeman » Wed Jan 16, 2019 12:10 am

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.
Attachments
log.txt
(324.29 KiB) Downloaded 51 times
Nyamekye,
User avatar
chrisPyres66
Posts: 70
Joined: Mon Jul 16, 2018 9:22 am
Location: France

Re: Pb to quantize the network

Postby chrisPyres66 » Fri Jan 18, 2019 5:18 am

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,
User avatar
kwagyeman
Posts: 2713
Joined: Sun May 24, 2015 2:10 pm

Re: Pb to quantize the network

Postby kwagyeman » Fri Jan 18, 2019 12:36 pm

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.
Nyamekye,

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 4 guests