diff options
author | 2016-03-10 10:10:16 -0800 | |
---|---|---|
committer | 2016-03-10 12:23:31 -0800 | |
commit | a4b9b51f85d0ac3be317848569b1fdbf530f58f3 (patch) | |
tree | b1e05eb2400d0e2a38fb24849a5aa18d9819470b | |
parent | f699ee7239101947c8d6b5556d43b017259996ed (diff) |
TensorFlow: add more helpful debugging when this check triggers on bad
graphs.
Change: 116880730
-rw-r--r-- | tensorflow/core/graph/graph.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tensorflow/core/graph/graph.cc b/tensorflow/core/graph/graph.cc index 90463a1c2f..57c5b2b200 100644 --- a/tensorflow/core/graph/graph.cc +++ b/tensorflow/core/graph/graph.cc @@ -307,7 +307,13 @@ void Graph::ToGraphDef(GraphDef* graph_def) const { if (edge->IsControlEdge()) { inputs.push_back(edge); } else { - DCHECK(inputs[edge->dst_input()] == nullptr); + CHECK(inputs[edge->dst_input()] == nullptr) + << "Edge " << edge->src()->DebugString() << ":" + << edge->dst()->DebugString() << " with dst_input " + << edge->dst_input() << " and had pre-existing input edge " + << inputs[edge->dst_input()]->src()->DebugString() << ":" + << inputs[edge->dst_input()]->dst()->DebugString(); + inputs[edge->dst_input()] = edge; } } |