I was trying tf-trt methord . i receive 0 TRTEngineOp nodes !! what would be the reason?
I however get different number of nodes before and after tf-trt conversion.
GRAPH_PB_PATH=r'Frozen.pb'
sess= tf.Session()
with gfile.FastGFile(GRAPH_PB_PATH,'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
##################### TF - TRT CODE #############
num_nodes = len(graph_def.node)
graph_size = len(graph_def.SerializeToString())
converter = trt.TrtGraphConverter(input_graph_def=graph_def,nodes_blacklist=['predictions_1']) #output node
trt_graph = converter.convert()
print("graph_size(MB)(native_tf): %.1f" % (float(graph_size)/(1<<20)))
print("graph_size(MB)(trt): %.1f" %
(float(len(trt_graph.SerializeToString()))/(1<<20)))
print("num_nodes(native_tf): %d" % num_nodes)
print("num_nodes(tftrt_total): %d" % len(trt_graph.node))
print("num_nodes(trt_only): %d" % len([1 for n in trt_graph.node if str(n.op)=='TRTEngineOp']))
configuration : linux, tensorflow 1.14 tensorrt 5 , Quadro M2000