冻结graph.pb到tflite以在Google coral上运行(缺少输入和输出数组)

2024-06-16 15:04:11 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经创建了一个TensorFlow模型,格式为was Frozed graph.pb,我想在带有google coral的Rasberry Pi上运行它,因此我尝试使用以下代码对其进行转换:

converter = tf.lite.TFLiteConverter.from_frozen_graph(
        graph_def_file, input_arrays, output_arrays)
tflite_model = converter.convert()
open("converted_model.tflite", "wb").write(tflite_model)

我在GoogleCollab上运行它,但我不知道如何使用输入和输出数组this is the model


Tags: 模型modeltensorflow格式googlepiconvertergraph