Paddle split出错

pdtvr36n  于 2021-11-30  发布在  Java
关注(0)|答案(3)|浏览(296)

paddle 版本:1.5.2
问题:
prob = layers.softmax(predict, use_cudnn=True)
prob_tec = layers.log(prob)

p, q = layers.split(prob, num_or_sections=2, dim=0)
p_tec, q_tec = layers.split(prob_tec, num_or_sections=2, dim=0)

其中,prob shape是[batch, len, dim],目的是要把prob和prob_tec按照batch都平分,
p, q = layers.split(prob, num_or_sections=2, dim=0) 正常
p_tec, q_tec = layers.split(prob_tec, num_or_sections=2, dim=0) 报错:
in split
'axis': dim
File "src/model.py", line 589, in transformer
p_tec, q_tec = layers.split(prob_tec, num_or_sections=2, dim=0)
File "src/train.py", line 641, in train
is_test=False)
File "src/train.py", line 745, in
train(args)
C++ Call stacks:
Cannot find variable split_1.tmp_0@GRAD at [/paddle/paddle/fluid/framework/op_desc.cc:195]

1yjd4xko

1yjd4xko1#

您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档常见问题历史IssueAI社区来寻求解答。祝您生活愉快~

Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the APIFAQGithub Issue and AI community to get the answer.Have a nice day!

643ylb08

643ylb082#

需要固定1.5.2版本吗,之后的一些版本或者最新的版本试试?

v64noz0r

v64noz0r3#

程序主体都是基于1.5.2的,升级的成本太大了

相关问题