我正在使用此代码导入 Inception V5 模型:
with tf.gfile.FastGFile(modelFileName, 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
t_input = tf.placeholder(np.float32, name='input') # define the input tensor
tf.import_graph_def(graph_def, {'input':t_input})
Run Code Online (Sandbox Code Playgroud)
这工作正常,但是如果我在 Inception V3 模型上尝试相同的代码,则会收到错误“尝试映射在 graph_def 中找不到的输入:[输入:0] ”
我已经确认我的模型中有一个名为 input 的张量,所以我不知道为什么它会给我这个错误?
| 归档时间: |
|
| 查看次数: |
849 次 |
| 最近记录: |