i've follow the cmsisnn tutotrial,but don't work

General discussion about topics related to OpenMV.
Jack_C
Posts: 4
Joined: Tue Sep 11, 2018 11:04 pm

i've follow the cmsisnn tutotrial,but don't work

Postby Jack_C » Tue Sep 11, 2018 11:26 pm

i just followed the tutotrial step by step,after some adjustment still don't work.the latest error is: current_blob = self.bottom_blob[current_layer][0]
IndexError: list index out of range.

Code: Select all

    current_blob = self.bottom_blob[current_layer][0]
IndexError: list index out of range

I do'n't know how to fix it.(I'm doing a project to recognize numbers,but the lenet.network can't be run on M7,so i want to train a smalled network to use on openmv)

Is there someone who can help me about this?
User avatar
kwagyeman
Posts: 2289
Joined: Sun May 24, 2015 2:10 pm

Re: i've follow the cmsisnn tutotrial,but don't work

Postby kwagyeman » Wed Sep 12, 2018 12:13 am

Hi, is this in the script that generates the CNN? It will be hard to debug what is wrong without some context. Can you please provide info on how to re-produce?
Nyamekye,
Jack_C
Posts: 4
Joined: Tue Sep 11, 2018 11:04 pm

Re: i've follow the cmsisnn tutotrial,but don't work

Postby Jack_C » Wed Sep 12, 2018 3:15 am

kwagyeman wrote:
Wed Sep 12, 2018 12:13 am
Hi, is this in the script that generates the CNN? It will be hard to debug what is wrong without some context. Can you please provide info on how to re-produce?


First i want to realise the convertion.so i just complie caffe and train the mnist examples and get the imdb, protxt file and lenet_iter_10000.caffemodel .After this i run the nn_quantizer.py and come the error:IndexError: list index out of range,never generated the pkl file.i really want show the Running results screenshot but i don't know how to upload picture :oops:

here's the full error information:

Code: Select all

Traceback (most recent call last):
  File "C:\Users\caipanhe\Downloads\caffe-master\examples\mnist\nn_quantizer.py", line 608, in <module>
    my_model.get_graph_connectivity()
  File "C:\Users\caipanhe\Downloads\caffe-master\examples\mnist\nn_quantizer.py", line 226, in get_graph_connectivity
    current_blob = self.bottom_blob[current_layer][0]
IndexError: list index out of range
User avatar
iabdalkader
Posts: 550
Joined: Sun May 24, 2015 3:53 pm

Re: i've follow the cmsisnn tutotrial,but don't work

Postby iabdalkader » Wed Sep 12, 2018 10:59 am

Can you attach the prototxt and the model ?
User avatar
kwagyeman
Posts: 2289
Joined: Sun May 24, 2015 2:10 pm

Re: i've follow the cmsisnn tutotrial,but don't work

Postby kwagyeman » Wed Sep 12, 2018 11:09 am

Is that our code?
Nyamekye,
Jack_C
Posts: 4
Joined: Tue Sep 11, 2018 11:04 pm

Re: i've follow the cmsisnn tutotrial,but don't work

Postby Jack_C » Wed Sep 12, 2018 9:20 pm

iabdalkader wrote:
Wed Sep 12, 2018 10:59 am
Can you attach the prototxt and the model ?
yeah,i change the file path
Jack_C
Posts: 4
Joined: Tue Sep 11, 2018 11:04 pm

Re: i've follow the cmsisnn tutotrial,but don't work

Postby Jack_C » Wed Sep 12, 2018 9:54 pm

kwagyeman wrote:
Wed Sep 12, 2018 11:09 am
Is that our code?
yeah,i got the code file from this url:https://github.com/openmv/openmv/tree/master/ml/cmsisnn
i rerun this yesterday,and came a new error:

Code: Select all

 Cannot copy param 0 weights from layer 'conv1'; shape mismatch.  Source param shape is 20 1 5 5 (500); target param shape is 20 3 5 5 (1500). To learn this layer's parameters from scratch rather than copying from a saved net, rename the layer.
when i used it to quantize cifar10 caffemode and attach the cifar10_train_and_test.prototxt,it worked and generated the pkl file.So i guess the quantization can't work on lenet caffemode cause the train images are grayscale?
User avatar
iabdalkader
Posts: 550
Joined: Sun May 24, 2015 3:53 pm

Re: i've follow the cmsisnn tutotrial,but don't work

Postby iabdalkader » Thu Sep 13, 2018 10:35 am

No it works on RGB and Grayscale, it seems you may have trained it on GS and the prototxt is for RGB. I can't help without the model and prototxt

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 5 guests