From 450c39a41301800f9b71e499d539ff7bbbd7414f Mon Sep 17 00:00:00 2001 From: Kexin Zhao Date: Mon, 5 Feb 2018 20:39:38 -0800 Subject: [PATCH] fix bug --- paddle/framework/prune.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/paddle/framework/prune.cc b/paddle/framework/prune.cc index 00fe551e5..ddd6b993d 100644 --- a/paddle/framework/prune.cc +++ b/paddle/framework/prune.cc @@ -182,6 +182,7 @@ void prune_impl(const proto::ProgramDesc& input, proto::ProgramDesc* output, // TODO(fengjiayi): Prune() could be inplaced to avoid unnecessary copies void Prune(const proto::ProgramDesc& input, proto::ProgramDesc* output) { std::set dependent_vars; + output->clear_blocks(); prune_impl(input, output, 0, -1, dependent_vars); } -- GitLab