TF -> UFF -> TRT _GridAnchor_TRT unsupported operation

Description

A clear and concise description of the bug or issue.

Environment

TensorRT Version: 6.0.1.5
GPU Type: TITAN X (Pascal)
Nvidia Driver Version: 410.108
CUDA Version: 10.0
CUDNN Version:
Operating System + Version: Ubuntu 18.04
Python Version (if applicable): 3.6
TensorFlow Version (if applicable): 1.14.0

I take frozen_inference.pb file from the tensorflow model of SSD_inception_coco_v2. Then, convert it with this command below.

python3 /usr/lib/python3.6/dist-packages/uff/bin/convert_to_uff.py frozen_inference_graph.pb -O NMS -p config.py

config.py is the standard config file of sampleUffSSD of tensorrt

output is :

Using output node NMS
Converting to UFF graph
Warning: No conversion function registered for layer: NMS_TRT yet.
Converting NMS as custom op: NMS_TRT
W0511 11:52:50.514701 139673444951872 deprecation_wrapper.py:119] From /usr/lib/python3.6/dist-packages/uff/bin/…/…/uff/converters/tensorflow/converter.py:179: The name tf.AttrValue is deprecated. Please use tf.compat.v1.AttrValue instead.

Warning: No conversion function registered for layer: FlattenConcat_TRT yet.
Converting concat_box_conf as custom op: FlattenConcat_TRT
Warning: No conversion function registered for layer: GridAnchor_TRT yet.
Converting GridAnchor as custom op: GridAnchor_TRT
Warning: No conversion function registered for layer: FlattenConcat_TRT yet.
Converting concat_box_loc as custom op: FlattenConcat_TRT
DEBUG [/usr/lib/python3.6/dist-packages/uff/bin/…/…/uff/converters/tensorflow/converter.py:96] Marking [‘NMS’] as outputs
No. nodes: 563
UFF Output written to frozen_inference_graph.uff

After successful conversion of pb file to uff file. I try to parse the uff file in python3 code with trt.uffparser.

And I get this error:

[TensorRT] ERROR: UffParser: Validator error: GridAnchor: Unsupported operation _GridAnchor_TRT
[TensorRT] ERROR: Network must have at least one output
Traceback (most recent call last):
File “/workspace/deep_cv/lv/models/pallet_locator/tensorrt_sample.py”, line 92, in
main()
File “/workspace/deep_cv/lv/models/pallet_locator/tensorrt_sample.py”, line 70, in main
with build_engine(ModelData.MODEL_FILE) as engine:
AttributeError: enter

I tried with several combinations of Tensorflow(1.14 and 1.15) and tensorrt (6 and 7). However could not solve it .
If you have any intuitions, it will be super awesome.
thanks for your time

Hi,

I tried to execute sampleUffSSD on “tensorrt:20.03-py3” NGC container and it seems to be working as expected.
https://docs.nvidia.com/deeplearning/sdk/tensorrt-container-release-notes/rel_20-03.html#rel_20-03

It seems to be a setup issue, request you to try using NGC container to avoid any system dependencies.

Thanks

1 Like