使用py_reader异步训练,save_inference_model报错
Created by: hexmiao
环境信息:PaddlePaddle-1.4.0, CPU单机训练, Mac OS 10.10 Python 3.5 当训练完一个轮次,调用 fluid.io.save_inference_model 方法时,报以下错误:
File "/Users/hex/paddle/lib/python3.5/site-packages/paddle/fluid/io.py", line 1000, in save_inference_model prepend_feed_ops(main_program, feeded_var_names) File "/Users/hex/paddle/lib/python3.5/site-packages/paddle/fluid/io.py", line 840, in prepend_feed_ops out = global_block.var(name) File "/Users/hex/paddle/lib/python3.5/site-packages/paddle/fluid/framework.py", line 1448, in var raise ValueError("var %s not in this block" % name) ValueError: var input not in this block