Quantization and Code generator Script
vinuraj1010 opened this issue · comments
Hi all,
I would like to know whether the nn_quantizer.py and code_gen.py works for all caffe models with specified restrictions.
As an example:
- In NXP mnist example, they are mentioning like nn_quantizer as it is doesn't work for MNIST.
- In some other github issues, it is mentioned that code_gen.py is not working as expected for mnist.
Please guide me through this.
I was planning to develop a NN model for mcu. If caffe model can be converted for mcu, it will be better for me.
otherwise I have to go for tensorflow lite.
I have also found that the nn_quantiser.py script does not work for alexnet trained mnist models giving the following error after using the command:
I0818 18:21:19.810953 3404 net.cpp:202] label_mnist_1_split does not need backward computation.
I0818 18:21:19.810956 3404 net.cpp:202] mnist does not need backward computation.
I0818 18:21:19.810959 3404 net.cpp:244] This network produces output accuracy
I0818 18:21:19.810962 3404 net.cpp:244] This network produces output loss
I0818 18:21:19.810972 3404 net.cpp:257] Network initialization done.
Traceback (most recent call last):
File "nn_quantizer.py", line 614, in
my_model.get_graph_connectivity()
File "nn_quantizer.py", line 232, in get_graph_connectivity
current_blob = self.bottom_blob[current_layer][0]
IndexError: list index out of range
ython3 nn_quantizer.py --model models/mnist/lenet_train_test.prototxt --weights models/mnist/lenet_iter_10000.caffemodel --save models/mnist/lenet_mnist.pkl