Python Tensorflow将pb文件转换为tflite
我有一个.pb文件扩展名。我需要将此文件转换为.tflite才能在Android上使用它。但我从来没有这样做过 我正在使用以下代码:Python Tensorflow将pb文件转换为tflite,python,android,tensorflow,model,Python,Android,Tensorflow,Model,我有一个.pb文件扩展名。我需要将此文件转换为.tflite才能在Android上使用它。但我从来没有这样做过 我正在使用以下代码: tflite_convert \ --output_file=/outputs/retrained_graph.tflite \ --graph_def_file=/inference_graph/frozen_inference_graph.pb \ --input_arrays=Mul \ --output_arrays=Softmax 我得到这样一
tflite_convert \
--output_file=/outputs/retrained_graph.tflite \
--graph_def_file=/inference_graph/frozen_inference_graph.pb \
--input_arrays=Mul \
--output_arrays=Softmax
我得到这样一个错误:
2019-10-02 14:52:07.693744: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
usage: tflite_convert [-h] --output_file OUTPUT_FILE
(--saved_model_dir SAVED_MODEL_DIR | --keras_model_file KERAS_MODEL_FILE)
tflite_convert: error: one of the arguments --saved_model_dir --keras_model_file is required
有人能告诉我哪里出错了吗?我不确定输入和输出值,也不知道如何找到它,这可能是问题所在吗
\研究\对象\检测\推理\图形:
仅支持keras模型文件和保存的模型,以便转换为TFLite。对于转换pb文件,您有两个选项:
tflitecoverters
中,支持pb文件转换