tensorflow/tensorrt

[Object Detection]: Incomplete shape - 1752 ops no flops stats due to incomplete shapes.

Opened this issue · 0 comments

Branch: r1.14

Hi all, I am using the script https://github.com/tensorflow/tensorrt/tree/r1.14%2B/tftrt/examples/object_detection to optimize the model faster_rcnn_inception_v2, although the test was completed successfully I got the below warning:

WARNING:tensorflow:From /usr/local/lib/python3.6/dist-packages/tensorflow_core/python/profiler/internal/flops_registry.py:142: tensor_shape_from_node_def_name (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.graph_util.tensor_shape_from_node_def_name`
**1752 ops no flops stats due to incomplete shapes.
Parsing Inputs...
Incomplete shape.**
.
.
.
DONE (t=1.91s).
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.245
 Average Precision  (AP) @[ IoU=0.50      | area=   all | maxDets=100 ] = 0.390
 Average Precision  (AP) @[ IoU=0.75      | area=   all | maxDets=100 ] = 0.265
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.054
 Average Precision  (AP) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.262
 Average Precision  (AP) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.446
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=  1 ] = 0.223
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets= 10 ] = 0.300
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=   all | maxDets=100 ] = 0.302
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= small | maxDets=100 ] = 0.062
 Average Recall     (AR) @[ IoU=0.50:0.95 | area=medium | maxDets=100 ] = 0.314
 Average Recall     (AR) @[ IoU=0.50:0.95 | area= large | maxDets=100 ] = 0.553
{
    "avg_latency_ms": 246.9332789430524,
    "avg_throughput_fps": 32.397415343295854,
    "map": 0.24546921626010776
}
ASSERTION PASSED: statistics['map'] > (0.243 - 0.01)

The test was completed successfully; however, when I tried to deploy the model with another SDK I got the below input shape errors, even though the batch size is 8, it seems the object_detection.py script didn't assign the parameter input_shape for some operations

  (0) Invalid argument: Input shape axis 0 must equal 8, got shape [5,600,1024,3]
         [[{{node Preprocessor/unstack}}]]
         [[SecondStagePostprocessor/BatchMultiClassNonMaxSuppression/MultiClassNonMaxSuppression_4/unstack/_2859]]
  (1) Invalid argument: Input shape axis 0 must equal 8, got shape [5,600,1024,3]
         [[{{node Preprocessor/unstack}}]]

Any idea on how to solve this incomplete shapes issue?