TFLite Conversion更改模型权重 [英] TFLite Conversion changing model weights

查看:636
本文介绍了TFLite Conversion更改模型权重的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个自定义构建的张量流图,该图实现了我自己实现的MobileNetV2-SSDLite.在PC上运行正常.

I have a custom built tensorflow graph implementing MobileNetV2-SSDLite which I implemented myself. It is working fine on the PC.

但是,当我将模型转换为TFLite(全部浮动,没有量化)时,模型权重会急剧变化.

However, when I convert the model to TFLite (all float, no quantization), the model weights are changed drastically.

举个例子,最初是一个过滤器- 0.13172674179077148, 2.3185202252437188e-32, -0.003990101162344217

To give an example, a filter which was initially - 0.13172674179077148, 2.3185202252437188e-32, -0.003990101162344217

成为- 4.165565013885498, -2.3981268405914307, -1.1919032335281372

becomes- 4.165565013885498, -2.3981268405914307, -1.1919032335281372

较大的权重值完全摆脱了我在设备上的推断.需要帮忙! :(

The large weight values are completely throwing off my on-device inferences. Need help! :(

推荐答案

您使用什么命令将其转换为tflite?例如,您使用的是toco,如果使用的是什么参数?虽然我没有查看过滤器,但这是我的默认说明用于微调MobileNetV2-SSD和SSDLite图,并且模型运行良好.

What command are you using to convert to tflite? For instance are you using toco, and if so what parameters are you using? While I haven't been looking at the filters, here are my default instructions for finetuning a MobileNetV2-SSD and SSDLite graphs and the model has been performing well.

这篇关于TFLite Conversion更改模型权重的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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