save_inference_model >1.5版本ValueError: var read_file_0.tmp_3 not in this block
Created by: eshaoliu
为使您的问题得到快速解决,在建立Issue前,请您先通过如下方式搜索是否有相似问题:【搜索issue关键字】【使用labels筛选】【官方文档】
- 标题:大于1.5版本的时候,会报ValueError: var read_file_0.tmp_3 not in this block
- 版本、环境信息: 1)PaddlePaddle版本:>1.5 2)GPU:cuda 0.9 cudnn0.7 python3 错误代码见:https://github.com/PaddlePaddle/Research/blob/master/KG/DuEL_Baseline/ernie/infer_type_ranker.py 159行,1.5版本不出错,1.6版本以上由于inference阶段op裁剪报如下错误, 2020-09-03 14:17:55 CUDAPlace(0) 2020-09-03 14:17:55 Traceback (most recent call last): 2020-09-03 14:17:55 File "/media/cfs/liuhongru3/Research-master/KG/DuEL_Baseline/ernie/infer_type_ranker.py", line 448, in 2020-09-03 14:17:55 main(args) 2020-09-03 14:17:55 File "/media/cfs/liuhongru3/Research-master/KG/DuEL_Baseline/ernie/infer_type_ranker.py", line 178, in main 2020-09-03 14:17:55 main_program=predict_prog, 2020-09-03 14:17:55 File "/usr/local/anaconda3/lib/python3.6/site-packages/paddle/fluid/io.py", line 1187, in save_inference_model 2020-09-03 14:17:55 prepend_feed_ops(main_program, feeded_var_names) 2020-09-03 14:17:55 File "/usr/local/anaconda3/lib/python3.6/site-packages/paddle/fluid/io.py", line 986, in prepend_feed_ops 2020-09-03 14:17:55 out = global_block.var(name) 2020-09-03 14:17:55 File "/usr/local/anaconda3/lib/python3.6/site-packages/paddle/fluid/framework.py", line 2234, in var 2020-09-03 14:17:55 raise ValueError("var %s not in this block" % name) 2020-09-03 14:17:55 ValueError: var read_file_0.tmp_3 not in this block reader 定义在这里https://github.com/PaddlePaddle/Research/blob/master/KG/DuEL_Baseline/ernie/reader/type_pairwise_ranker_reader.py model 定义在这里 https://github.com/PaddlePaddle/Research/blob/master/KG/DuEL_Baseline/ernie/model/ernie.py