From: Sami Kama Date: Thu, 5 Apr 2018 23:37:36 +0000 (-0700) Subject: Ignore control edges as inputs X-Git-Tag: tflite-v0.1.7~24^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d3cd7815e55b65dc88ea219400d0bb7b63a1e57;p=platform%2Fupstream%2Ftensorflow.git Ignore control edges as inputs --- diff --git a/tensorflow/contrib/tensorrt/convert/convert_nodes.cc b/tensorflow/contrib/tensorrt/convert/convert_nodes.cc index ee1273d..567b4af 100644 --- a/tensorflow/contrib/tensorrt/convert/convert_nodes.cc +++ b/tensorflow/contrib/tensorrt/convert/convert_nodes.cc @@ -443,7 +443,9 @@ class Converter { * 2) Control dependency inputs contain caret at the beginning and we * remove this and annotate the edge as a control dependency. ************************************************************************/ - string name = input_name[0] == '^' ? input_name.substr(1) : input_name; + // skip control nodes + if (input_name[0] == '^' ) continue; + string name = input_name; auto first = name.find_first_of(':'); if (first != string::npos && first + 2 == name.size() && name[first + 1] == '0')