[英]Error when trying to convert .pb file to .tflite
I am trying to convert the link template, to .tflite, using this code, but it always gives an error.我正在尝试使用此代码将链接模板转换为 .tflite,但它总是出现错误。 Model link: https://tfhub.dev/google/openimages_v4/ssd/mobilenet_v2/1
模型链接: https : //tfhub.dev/google/openimages_v4/ssd/mobilenet_v2/1
Code:代码:
import tensorflow as tf
saved_model_dir = 'path of file'
converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
tflite_model = converter.convert()
with open('model.tflite', 'wb') as f:
f.write(tflite_model)
Error Message:错误信息:
SavedModel file does not exist at: openimages_v3_ssd_mobilenet_v2_1/{saved_model.pbtxt|saved_model.pb}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.