提交 ba15d6b1 编写于 作者: D dongdaxiang

move root_scope->DropKids() into Finalize() so that we do not have to drop all the kids

test=develop
上级 be74de2c
......@@ -73,6 +73,7 @@ void DistMultiTrainer::Finalize() {
}
pull_dense_worker_->Stop();
dataset_ptr_->DestroyReaders();
root_scope_->DropKids();
}
} // end namespace framework
......
......@@ -143,8 +143,6 @@ void Executor::RunFromDataset(const ProgramDesc& main_program, Scope* scope,
trainer->Run();
VLOG(3) << "Trainer going to finalize";
trainer->Finalize();
VLOG(3) << "Drop current scope kids";
scope->DropKids();
return;
}
......
......@@ -76,6 +76,7 @@ void MultiTrainer::Finalize() {
th.join();
}
dataset_ptr_->DestroyReaders();
root_scope_->DropKids();
}
} // end namespace framework
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册