Calculation operations with the parameters of a TFLite quantized model

為{幸葍}努か 提交于 2019-12-31 05:15:07

问题


I am trying to implement image classification in hardware using the quantized Mobilenetv2 model taken from here. To do that, I first need to reproduce the inference process from the beginning to the end to make sure I understand the calculations/operations that are performed on the data.

The first target is the Conv fuction. I can see how it is being calculated, but there are several arguments that are passed to this function which I would like to know how they are produced: output_offset, output_multiplier,output_shift, output_activation_min, output_activation_max. I cannot find the previous function that calls the Conv() function with these parameters. This would hopefully give me an insight of how these arguments are generated. Could someone point me to the right line of the source code?

Another gap in the sourcecode is at the interpreter.invoke() function. I wish to track and see what happens next, but can not find the soursecode that implements the invoke() function. The help would be greatly appreciated!


回答1:


If you want to know how the conv reference code is used you can read the code for the conv operator.

The python interpreter uses swig to call the C++ intepreter.

Hope this helps.



来源:https://stackoverflow.com/questions/59118407/calculation-operations-with-the-parameters-of-a-tflite-quantized-model

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!