diff --git a/paddle/fluid/operators/lod_reset_op.cc b/paddle/fluid/operators/lod_reset_op.cc index 7c8fe5fbd7629b2d82552135bc1b052dfbabeba0..f71463a103a6df9d13fc317a7858f60e5fa5f135 100644 --- a/paddle/fluid/operators/lod_reset_op.cc +++ b/paddle/fluid/operators/lod_reset_op.cc @@ -33,6 +33,11 @@ class LoDResetOp : public framework::OperatorWithKernel { "If Input(Y) not provided, the target lod should be " "specified by attribute `target_lod`."); } + else + { + ctx->ShareLoD( "Y", "Out"); + } + ctx->SetOutputDim("Out", ctx->GetInputDim("X")); }