Using a .pb file to create an optimized graph def using TF TRT integration with TRT 3, I can succesfully convert a mnist model, however when using an object detection model, it outputs the following, does this mean, no operation was optimized ?
library {
}
versions {
}
The following code was used for both:
import tensorflow as tf
from tensorflow.python.platform import gfile
with tf.Session() as sess:
print("load graph")
with gfile.FastGFile("model.pb",'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
# Get optimized graph
trt_graph = trt.create_inference_graph(
input_graph_def=graph_def,
outputs=["replace_with_output_node_name"],
max_batch_size=1,
max_workspace_size_bytes=1 << 25,
precision_mode="FP32", # TRT Engine precision "FP32","FP16" or "INT8"
minimum_segment_size=2 # minimum number of nodes in an engine
)
trt_graph