未验证 提交 99e6e8b0 编写于 作者: Z Zeng Jinle 提交者: GitHub

Merge pull request #15179 from sneaxiy/fix_crf_grad_lod

Fix crf grad lod share
...@@ -230,10 +230,12 @@ class LinearChainCRFGradOp : public framework::OperatorWithKernel { ...@@ -230,10 +230,12 @@ class LinearChainCRFGradOp : public framework::OperatorWithKernel {
if (ctx->HasOutput(framework::GradVarName("Emission"))) { if (ctx->HasOutput(framework::GradVarName("Emission"))) {
ctx->SetOutputDim(framework::GradVarName("Emission"), emission_exps_dims); ctx->SetOutputDim(framework::GradVarName("Emission"), emission_exps_dims);
ctx->ShareLoD("Emission", framework::GradVarName("Emission"));
} }
if (ctx->HasOutput(framework::GradVarName("Transition"))) { if (ctx->HasOutput(framework::GradVarName("Transition"))) {
ctx->SetOutputDim(framework::GradVarName("Transition"), ctx->SetOutputDim(framework::GradVarName("Transition"),
transition_exps_dims); transition_exps_dims);
ctx->ShareLoD("Transition", framework::GradVarName("Transition"));
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册