From 147bf00ffee4f02882d852ca433ea9322c156e3d Mon Sep 17 00:00:00 2001 From: qiaolongfei Date: Mon, 30 Jul 2018 12:35:18 +0800 Subject: [PATCH] clear mutable rows for the output of split_ids_op --- paddle/fluid/operators/split_ids_op.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddle/fluid/operators/split_ids_op.h b/paddle/fluid/operators/split_ids_op.h index d6caf626cb5..c4af5a65fc5 100644 --- a/paddle/fluid/operators/split_ids_op.h +++ b/paddle/fluid/operators/split_ids_op.h @@ -68,6 +68,9 @@ class SplitIdsOpKernel : public framework::OpKernel { const auto &ids_rows = ids_selected_rows->rows(); auto outs = ctx.MultiOutput("Out"); const size_t shard_num = outs.size(); + for (auto &out : outs) { + out->mutable_rows()->clear(); + } // get rows for outputs std::unordered_map id_to_index; for (size_t i = 0; i < ids_rows.size(); ++i) { -- GitLab