Expected lods.size() ==
神魔黑风 发布于2020-04-21 21:20 浏览:225 回复:2
0
收藏

运行程序出现下列问题:

Traceback (most recent call last):
File "./ernie/run_duie.py", line 371, in
main(args)
File "./ernie/run_duie.py", line 252, in main
train_exe.run(fetch_list=[])
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/parallel_executor.py", line 280, in run
return_numpy=return_numpy)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py", line 666, in run
return_numpy=return_numpy)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/executor.py", line 528, in _run_parallel
exe.run(fetch_var_names, fetch_var_name)
paddle.fluid.core_avx.EnforceNotMet: Invoke operator lstm error.
Python Callstacks:
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/framework.py", line 1771, in append_op
attrs=kwargs.get("attrs", None))
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op
return self.main_program.current_block().append_op(*args, **kwargs)
File "/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/paddle/fluid/layers/nn.py", line 547, in dynamic_lstm
'candidate_activation': candidate_activation
File "/home/aistudio/DuIe_baseline/ernie/finetune/relation_extraction_multi_cls.py", line 69, in create_model
size=256)
File "./ernie/run_duie.py", line 121, in main
ernie_config=ernie_config)
File "./ernie/run_duie.py", line 371, in
main(args)
C++ Callstacks:
Enforce failed. Expected lods.size() == 1UL, but received lods.size():0 != 1UL:1.
Only support one level sequence now. at [/paddle/paddle/fluid/operators/math/sequence2batch.h:79]
PaddlePaddle Call Stacks:
0 0x7f490190dd58p void paddle::platform::EnforceNotMet::Init(std::string, char const*, int) + 360
1 0x7f490190e0a7p paddle::platform::EnforceNotMet::EnforceNotMet(std::string const&, char const*, int) + 87

请问有人遇到同样的问题么,怎么解决?谢谢

 

收藏
点赞
0
个赞
共2条回复 最后由鹿鼎记肯定回复于2020-04-22 10:29
#3鹿鼎记肯定回复于2020-04-22 10:29:17

File "./ernie/run_duie.py", line 252, in main
train_exe.run(fetch_list=[])

Enforce failed. Expected lods.size() == 1UL, but received lods.size():0 != 1UL:1.

如果是静态图,exe执行器里应该有数据或者程序,并且还要有输出,但是你只有一个输出fetch_list而且还是空的,所以读到的数据是0维(空数据)而不是1维(序列),建议检查一下执行部分,可以的话贴一下源码最好了

0
#2xiaohongyd回复于2020-04-22 00:50:33

File "./ernie/run_duie.py", line 121, in main
ernie_config=ernie_config)
File "./ernie/run_duie.py", line 371, in
main(args)

 

看这里好像是配置参数不对呀,要么没传配置参数,要么ernie_config这个配置文件有错误。

0
TOP
切换版块