使用TFLite量化模型的参数进行计算操作 [英] Calculation operations with the parameters of a TFLite quantized model
问题描述
我正在尝试使用从此处提取的量化Mobilenetv2模型在硬件中实现图像分类.一个>.为此,我首先需要从头到尾重现推理过程,以确保我理解对数据执行的计算/运算.
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!
推荐答案
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.
希望这会有所帮助.
这篇关于使用TFLite量化模型的参数进行计算操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!