Minor improve to assertion (#3295)
authorPedro Larroy <pedro.larroy.lists@gmail.com>
Thu, 6 Jun 2019 22:14:11 +0000 (15:14 -0700)
committerTianqi Chen <tqchen@users.noreply.github.com>
Thu, 6 Jun 2019 22:14:11 +0000 (15:14 -0700)
nnvm/src/core/graph.cc

index 29149f4..e2d6d36 100644 (file)
@@ -107,7 +107,7 @@ IndexedGraph::IndexedGraph(const Graph &g) {
       for (const auto& nptr : n->control_deps) {
         if (!nptr->is_variable() && is_ghost.get(nptr->op(), false)) continue;
         auto it = node2index_.find(nptr.get());
-        CHECK(it != node2index_.end() && it->first == nptr.get());
+        CHECK(it != node2index_.end()) << "control dep not found in graph";
         control_deps_.push_back(it->second);
       }
       control_rptr.push_back(control_deps_.size());