未验证 提交 430e2565 编写于 作者: G Guo Sheng 提交者: GitHub

Fix the usage of out_grad lod in sequence_slice_op. (#17625)

test=develop
上级 afc3d85d
......@@ -135,7 +135,8 @@ class SequenceSliceGradOpKernel : public framework::OpKernel<T> {
}
auto lod = in->lod();
auto out_lod = out_grad->lod();
// to avoid out_grad missing lod, compute lod again
auto out_lod = SequenceSliceLoD(*in, offset_data, length_data);
if (x_grad) {
x_grad->mutable_data<T>(ctx.GetPlace());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册