diff options
author | Sanjoy Das <sanjoy@google.com> | 2018-07-18 15:23:40 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-07-18 15:32:28 -0700 |
commit | c80f1493222720c2601c7d68f0ec0dd236ceb621 (patch) | |
tree | 0507551d1bc05a1b862bbf197a110ff466e9dbb4 /tensorflow/tools/graph_transforms/transform_utils.cc | |
parent | e3006b1d706fb171525cdd5cfe3a2305d6a5d879 (diff) |
Add some LOGging when we detect nodes in a cycle
PiperOrigin-RevId: 205146924
Diffstat (limited to 'tensorflow/tools/graph_transforms/transform_utils.cc')
-rw-r--r-- | tensorflow/tools/graph_transforms/transform_utils.cc | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tensorflow/tools/graph_transforms/transform_utils.cc b/tensorflow/tools/graph_transforms/transform_utils.cc index af17fd75bc..cb084e49b7 100644 --- a/tensorflow/tools/graph_transforms/transform_utils.cc +++ b/tensorflow/tools/graph_transforms/transform_utils.cc @@ -247,9 +247,16 @@ Status SortByExecutionOrder(const GraphDef& input_graph_def, } } - if (processed < input_graph_def.node_size()) { - return errors::InvalidArgument(input_graph_def.node_size() - processed, - " nodes in a cycle"); + if (processed < num_nodes) { + LOG(WARNING) << "IN " << __func__ << (num_nodes - processed) + << " NODES IN A CYCLE"; + for (int64 i = 0; i < num_nodes; i++) { + if (pending_count[i] != 0) { + LOG(WARNING) << "PENDING: " << SummarizeNodeDef(input_graph_def.node(i)) + << "WITH PENDING COUNT = " << pending_count[i]; + } + } + return errors::InvalidArgument(num_nodes - processed, " nodes in a cycle"); } return Status::OK(); } |