如何使用相同的测试数据测试 .tflite 模型以证明它的行为与原始模型相同? [英] How can I test a .tflite model to prove that it behaves as the original model using the same Test Data?

查看:28
本文介绍了如何使用相同的测试数据测试 .tflite 模型以证明它的行为与原始模型相同?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经基于经过训练的模型生成了一个 .tflite 模型,我想测试 tfilte 模型给出的结果与原始模型相同.

I have generated a .tflite model based on a trained model, I would like to test that the tfilte model gives the same results as the original model.

给出相同的测试数据并获得相同的结果.

Giving both the same test data and obtaining the same result.

推荐答案

您可以使用 TensorFlow Lite Python 解释器来测试您的 tflite 模型.

You may use TensorFlow Lite Python interpreter to test your tflite model.

它允许您在 python shell 中提供输入数据并直接读取输出,就像您只是使用普通的 tensorflow 模型一样.

It allows you to feed input data in python shell and read the output directly like you are just using a normal tensorflow model.

我已经在此处回答了这个问题.

I have answered this question here.

您可以阅读此 TensorFlow lite 官方指南 了解详细信息.

And you can read this TensorFlow lite official guide for detailed information.

您还可以使用 Netron 来可视化您的模型.它允许您直接加载 .tflite 文件并检查模型架构和模型权重.

You can also use Netron to visualize your model. It allows you to load your .tflite file directly and inspect your model architecture and model weights.

这篇关于如何使用相同的测试数据测试 .tflite 模型以证明它的行为与原始模型相同?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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