我正在尝试将saved_model从TensorFlow Object Detection Model Zoo转换为tflite文件。我正在使用的模型是ssd_mobilenet_v2_oid_v4_2018_12_12。
所以我用export_tflite_ssd_graph.py:
D:\TensorFlow\models\research\object_detection>python export_tflite_ssd_graph.py
--pipeline_config_path=D:\Models\ssd_mobilenet_v2_oid_v4_2018_12_12\pipeline.config
--trained_checkpoint_prefix=D:\Models\ssd_mobilenet_v2_oid_v4_2018_12_12\model.ckpt.data-00000-of-00001
--output_directory=D:\Models
--add_postprocessing_op=true
我收到以下错误
2020-01-20 19:43:36.765263: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
2020-01-20 19:43:36.770058: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
File "export_tflite_ssd_graph.py", line 96, in <module>
from object_detection import export_tflite_ssd_graph_lib
File "C:\Users\Bhavin\AppData\Local\Programs\Python\Python36\lib\site-packages\object_detection-0.1-py3.6.egg\object_detection\export_tflite_ssd_graph_lib.py", line 26, in <module>
from tensorflow.tools.graph_transforms import TransformGraph
ModuleNotFoundError: No module named 'tensorflow.tools.graph_transforms'
我尝试使用pip升级tensorflow,但仍然出现相同的错误。
我正在使用Windows 10和TensorFlow 2.1.0。
面对同样的问题。临时修复已降级为tf 1.15.0