From 5daad162184e1e7927ae5763eea8807c5118cfac Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Tue, 17 Jul 2018 20:44:24 +0800 Subject: [PATCH] polish --- paddle/fluid/framework/details/var_handle.h | 3 ++- paddle/fluid/framework/ir/graph.h | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/framework/details/var_handle.h b/paddle/fluid/framework/details/var_handle.h index ae23e3b1f8d..ba8b38d1e70 100644 --- a/paddle/fluid/framework/details/var_handle.h +++ b/paddle/fluid/framework/details/var_handle.h @@ -56,7 +56,8 @@ struct VarHandleBase { void RemoveOutput(OpHandleBase* out, ir::Node* node) { pending_ops_.erase(out); - std::remove(node_->outputs.begin(), node_->outputs.end(), node); + node_->outputs.erase( + std::remove(node_->outputs.begin(), node_->outputs.end(), node)); } void ClearGeneratedOp() { diff --git a/paddle/fluid/framework/ir/graph.h b/paddle/fluid/framework/ir/graph.h index 3c268682afe..2ab018dd859 100644 --- a/paddle/fluid/framework/ir/graph.h +++ b/paddle/fluid/framework/ir/graph.h @@ -64,9 +64,6 @@ class Graph { return nodes.back().get(); } - // TODO(paddle-dev): There shouldn't be kNone nodes in the ir::Graph. - // node should either be a executable kOperation or a kVariable. kNone - // node is a temporary solution. ir::Node* CreateEmptyNode(const std::string& name, ir::Node::Type type) { nodes.emplace_back(new ir::Node(name, type)); return nodes.back().get(); -- GitLab