在Tensorflow graphdef中获取数组的名称

时间:2019-07-02 18:48:41

标签: python tensorflow

我有一个我未创建的graphdef,我试图将其转换为TensorFlow lite,但我需要输入数组。没有创建此模型,我不知道输入数组将被调用什么。有什么办法可以找到数组的名称或在没有数组的情况下进行转换。我已经尝试过使用Gfile加载graphdef,但这没用。

import tensorflow as tf
input_arrays = []
output_arrays = ["out_graph_opt"]
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)

0 个答案:

没有答案