从tensorflow隐蔽到TensorflowLite问题

时间:2019-11-25 08:10:44

标签: tensorflow

import tensorflow as tf

converter = tf.lite.TFLiteConverter.from_saved_model("C:\\Users\\user\\PycharmProjects\\converter\\saved_model.pb")
model = converter.convert()

它给出了

OSError: SavedModel file does not exist at: C:\Users\user\PycharmProjects\converter\saved_model.pb/{saved_model.pbtxt|saved_model.pb}

我想在tensorflow lite模型中转换保存在saved_model.pb中的tensorflow模型并将其保存,但是它一直给我这个错误 任何人都可以帮助解决此问题吗?

1 个答案:

答案 0 :(得分:0)

尝试一下

import tensorflow as tf

converter = tf.lite.TFLiteConverter.from_saved_model("C:/Users/user/PycharmProjects/converter")
model = converter.convert()