在 windows 上通过命令行将 tensorflow 模型转换为 tflite 模型时遇到麻烦。
图像尺寸=224
tflite_convert \
--graph_def_file=tf_files/retrained_graph.pb \
--output_file=tf_files/optimized_graph.lite \
--input_format=TENSORFLOW_GRAPHDEF \
--output_format=TFLITE \
--input_shape=1,${IMAGE_SIZE},${IMAGE_SIZE},3 \
--input_array=input \
--output_array=final_result \
--inference_type=FLOAT \
--input_data_type=FLOAT
它总是给出错误
ModuleNotFoundError:没有名为“tensorflow.contrib.lite.python.tflite_convert”的模块
在 Windows 上使用 tflite_convert 有问题。