【问题标题】:Convertion of tflite model to ONNX modeltflite 模型到 ONNX 模型的转换
【发布时间】:2019-09-25 09:53:26
【问题描述】:

我有一个 tflite 模型,我想将其转换为 tensorflow 或 keras 或 ONNX 格式。有什么办法吗?

我可以使用 tf 解释器导入它并在 python 上运行它。但是我想将其转换为上述格式之一。

import tensorflow as tf
interpreter = tf.lite.Interpreter(model_path="conv_actions_frozen.tflite")
tensors = interpreter.get_tensor_details()

【问题讨论】:

  • 您找到解决方案了吗?我有同样的问题,因为我想在 tfjs 中运行一个 tflite 模型。
  • 你有解决办法吗?

标签: tensorflow tensorflow-lite onnx


【解决方案1】:

现在有转换器可以将 tflite 模型转换为 onnx 格式。安装 tflite2onnx 库。 你所要做的就是:

import tflite2onnx

tflite_path = "path/to/the/tflitemodel"
onnx_path = "path/where/you/want/to/save/your/model" #modelname.onnx


tflite2onnx.convert(tflite_path,onnx_path)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-03-31
    • 2021-01-24
    • 2018-10-05
    • 1970-01-01
    • 2020-02-12
    • 2022-10-13
    • 2023-01-31
    相关资源
    最近更新 更多