我已经使用SSD MobileNet V2 FPNLite 640x640和tensorflow 2.1.0对我的模型进行了培训。要创建.pb文件,请使用文件导出\u tflite\u图形\u tf2.py。现在,希望将.pb文件转换为.tflite。 我使用了tensorflow社区推荐的以下代码。但它正在将模型转换为1kb tflite文件
我也试着每晚使用tf,但同样的转换成1kb
import tensorflow as tf
# Convert the model
converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir) # path to the SavedModel directory
tflite_model = converter.convert()
# Save the model.
with open('model.tflite', 'wb') as f:
f.write(tflite_model)
目前没有回答
相关问题 更多 >
编程相关推荐