OSError:SavedModel 文件不存在于:G:\Users\new LAPTOP\Desktop\Desktop\eng\5th\GP\models\ASL_Model.h5/{saved_model.pbtxt|saved_model.pb}import tensorflow as tf
'''
转换模型
MODEL_PATH = r"G:\Users\new LAPTOP\Desktop\Desktop\eng\5th\GP\models\ASL_Model.h5" converter = tf.lite.TFLiteConverter.from_saved_model(MODEL_PATH) # SavedModel 目录的路径 tflite_model = converter.兑换()
保存模型。
与 open('model.tflite', 'wb') as f: f.write(tflite_model) '''