TensorFlow冻结图:必需的位置参数未使用的参数

2024-10-01 09:23:10 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用的是TensorFlow1.7和Python3.6.5,在一台带有High Sierra的Mac上。在

我训练了我的第一个模型,所以我基本上

  • a图形.pbtxtCNN图形结构文件
  • 一些型号.ckpt-21000个文件(.meta、.index.data)

我尝试在bash上使用命令行freeze\u graph命令冻结图形:

freeze_graph
--input_graph=/…/graph.pbtxt
--input_checkpoint=/…/model.ckpt-21000
--input_binary=false
--output_graph=/…/frozen_mnist.pb
--output_node_names=softmax_tensor

但我有个错误:

^{pr2}$

我真的不知道我在那里遗漏了什么。 我很确定我使用的语法是正确的。在


Tags: 文件模型图形inputoutputmac结构meta
1条回答
网友
1楼 · 发布于 2024-10-01 09:23:10

我找到了一个解决方法来冻结我的图表。 我把它贴在这里,如果有人遇到同样的问题,他们可以使用这个。在

而不是

freeze_graph
 input_graph=/…/graph.pbtxt
 input_checkpoint=/…/model.ckpt-21000
 input_binary=false
 output_graph=/…/frozen_mnist.pb
 output_node_names=softmax_tensor

使用

^{pr2}$

所以基本上我用python3-m代替了命令freeze-graphtensorflow.python.tools.冻结图形。在

不过,我还是很想知道为什么命令行对我不起作用:(

相关问题 更多 >