无法优化训练的张量流图

2024-05-18 16:16:16 发布

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

我是tensorflow的初学者。我想量化一个已经训练好的初始模型。我按照步骤运行了以下代码:

python -m tensorflow.python.tools.optimize_for_inference \ --input=tf_files/retrained_graph.pb \ --output=tf_files/optimized_graph.pb \ --input_names="input" \ --output_names="final_result"

但我也遇到了这样的错误:

请有人帮我解决这个问题。


Tags: 代码forinputoutputnamestftensorflow步骤
1条回答
网友
1楼 · 发布于 2024-05-18 16:16:16

改变

 input_names="input" 

进入

^{pr2}$

或者,如果您在windows上,只需在您当前的工作空间在终端中运行以下命令

python -m tensorflow.python.tools.optimize_for_inference  input 
retrained_graph.pb  output optimized_graph.pb  input_names="Mul"   
output_names="final_result" 

相关问题 更多 >

    热门问题