使用TFLite量化模型的参数进行计算操作 [英] Calculation operations with the parameters of a TFLite quantized model

查看:624
本文介绍了使用TFLite量化模型的参数进行计算操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用从此处提取的量化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!

推荐答案

如果您想知道如何使用conv参考代码,可以阅读

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

python解释器使用 swig 调用 C ++解释器.

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

希望这会有所帮助.

这篇关于使用TFLite量化模型的参数进行计算操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆