【问题标题】:convert .tflite to .pb model to test performance of tflite model on test tfrecords将 .tflite 转换为 .pb 模型以测试 tflite 模型在测试 tfrecords 上的性能
【发布时间】:2021-08-15 11:21:28
【问题描述】:
我目前正在从事对象检测任务。
直到 TF1.2 我们可以使用 toco 从 .tflite 模型文件中获取 .pb 文件。 tf2.4或tf2.5有解决办法吗?
如果没有,我如何在测试 tf 记录上测试 .tflite 模型的性能?
谢谢你,
安树
【问题讨论】:
标签:
tensorflow
object-detection
tensorflow-lite
object-detection-api
tensorflow2.x
【解决方案1】:
您可以使用 tf.data 等库读取 TFRecord 文件,并将其中的每个数据转换为 np.float32 或 np.something_array 格式,以便将数据提供给 tflite.interpreter。