未验证 提交 3d9dee57 编写于 作者: A Aurelius84 提交者: GitHub

Set lod_level of Out in compile time of sequence_pool_op (#21604)

上级 34670596
......@@ -31,9 +31,11 @@ class SequencePoolOp : public framework::OperatorWithKernel {
if (!ctx->IsRuntime()) {
// Check the lod_level for compile-time.
auto in_lod_level = ctx->GetLoDLevel("X");
PADDLE_ENFORCE_GT(
ctx->GetLoDLevel("X"), 0,
in_lod_level, 0,
"The LoD level Input(X) of sequence_pool should be larger than 0.");
ctx->SetLoDLevel("Out", in_lod_level - 1);
}
ctx->SetOutputDim("Out", ctx->GetInputDim("X"));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册