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.
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)
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
here’s the full error information:
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
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?
Sorry to necro this thread. I’ve been running into the same problem.
I am running the nn_quantizer script on a slightly modified LeNet provided in the examples of Caffe. I’ve converted the .caffemodel file to .caffemodel.h5 via the convert_caffemodel script in caffe/python.
current_blob = self.bottom_blob[current_layer][0]
IndexError: list index out of range