# SSD InceptionV2 TensorRT Error

**URL:** <https://forums.developer.nvidia.com/t/ssd-inceptionv2-tensorrt-error/76534>\
**Category:** TensorRT\
**Created:** [June 17, 2019, 9:23am UTC](https://forums.developer.nvidia.com/t/ssd-inceptionv2-tensorrt-error/76534 "2019-06-17T09:23:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashispapu](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ashispapu](https://forums.developer.nvidia.com/u/ashispapu)\
**Post date:** [June 17, 2019, 9:23am UTC](https://forums.developer.nvidia.com/t/ssd-inceptionv2-tensorrt-error/76534/1 "2019-06-17T09:23:21Z")

</div>

Hi team,

I am trying to convert ssd-inceptionV2(six class) model using TensorRT.I could convert the .pb to Uff, and while trying to create the engine getting the below error.

[TensorRT] ERROR: UffParser: Validator error: concat\_box\_loc: Unsupported operation \_FlattenConcat\_TRT

Linux distro and version : Ubuntu 16.04  
GPU type : 1070  
nvidia driver version  
CUDA version : 9.0  
CUDNN version: 7.5.0  
Python version [if using python] : 3.5  
Tensorflow version : 1.13  
TensorRT version :5.1.2.2

# below is my config.py

import graphsurgeon as gs  
import tensorflow as tf

Input = gs.create\_node(“Input”,  
op=“Placeholder”,  
dtype=tf.float32,  
shape=[1, 3, 300, 300])  
PriorBox = gs.create\_plugin\_node(name=“GridAnchor”, op=“GridAnchor\_TRT”,  
numLayers=6,  
minSize=0.2,  
maxSize=0.95,  
aspectRatios=[1.0, 2.0, 0.5, 3.0, 0.33],  
variance=[0.1,0.1,0.2,0.2],  
featureMapShapes=[19, 10, 5, 3, 2, 1])  
#featureMapShapes=[38, 19, 10, 5, 3, 2])  
NMS = gs.create\_plugin\_node(name=“NMS”, op=“NMS\_TRT”,  
shareLocation=1,  
varianceEncodedInTarget=0,  
backgroundLabelId=0,  
confidenceThreshold=1e-8,  
nmsThreshold=0.6,  
topK=100,  
keepTopK=100,  
numClasses=7,  
inputOrder=[0, 2, 1],  
confSigmoid=1,  
isNormalized=1,  
scoreConverter=“SIGMOID”)

concat\_priorbox = gs.create\_node(name=“concat\_priorbox”, op=“ConcatV2”, dtype=tf.float32, axis=2)  
concat\_box\_loc = gs.create\_node(“concat\_box\_loc”, op=“FlattenConcat\_TRT”, dtype=tf.float32, axis=1, ignoreBatch=0)  
concat\_box\_conf = gs.create\_node(“concat\_box\_conf”, op=“FlattenConcat\_TRT”, dtype=tf.float32, axis=1, ignoreBatch=0)

namespace\_plugin\_map = {  
“MultipleGridAnchorGenerator”: PriorBox,  
“Postprocessor”: NMS,  
“Preprocessor”: Input,  
# “ToFloat”: Input,  
# “image\_tensor”: Input,  
#“MultipleGridAnchorGenerator/Concatenate”: concat\_priorbox,  
“Concatenate/concat”: concat\_priorbox,  
“concat”: concat\_box\_loc,  
“concat\_1”: concat\_box\_conf,  
}

namespace\_remove = {  
“ToFloat”,  
“image\_tensor”,  
“Preprocessor/map/TensorArrayStack\_1/TensorArrayGatherV3”,  
}

def preprocess(dynamic\_graph):  
print('\>\>\>\>\>\>\>\>\>\>\>\> Inside preprocess ')  
# remove the unrelated or error layers  
dynamic\_graph.remove(dynamic\_graph.find\_nodes\_by\_path(namespace\_remove), remove\_exclusive\_dependencies=False)

```
# Now create a new graph by collapsing namespaces
dynamic_graph.collapse_namespaces(namespace_plugin_map)
# Remove the outputs, so we just have a single output node (NMS).
dynamic_graph.remove(dynamic_graph.graph_outputs, remove_exclusive_dependencies=False)

# Remove the Squeeze to avoid "Assertion `isPlugin(layerName)' failed"
Squeeze = dynamic_graph.find_node_inputs_by_name(dynamic_graph.graph_outputs[0], 'Squeeze')
dynamic_graph.forward_inputs(Squeeze)

```

---

<div class="post-metadata">

**Author:** ![ashispapu](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ashispapu](https://forums.developer.nvidia.com/u/ashispapu)\
**Post date:** [June 18, 2019, 11:06am UTC](https://forums.developer.nvidia.com/t/ssd-inceptionv2-tensorrt-error/76534/2 "2019-06-18T11:06:52Z")

</div>

Attaching all nodes/operation during the conversion to UFF. Not seeing any operation by \_FlattenConcat\_TRT. However getting error for the same while creating the trt engine.

Please find the list of nodes/opeartion in the below path( convert\_trt\_ssd\_6\_class.txt)

frozen\_inference\_graph\_inception\_6\_class.pbtxt has \_FlattenConcat\_TRT. NOT sure how the \_ is getting appended.

> **[Filebin | n6xw204kxp7u4ozy](https://filebin.net/n6xw204kxp7u4ozy)**
>
> Convenient file sharing. Registration is not required. Large files are supported.

---

<div class="post-metadata">

**Author:** ![ashispapu](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ashispapu](https://forums.developer.nvidia.com/u/ashispapu)\
**Post date:** [June 21, 2019, 6:13am UTC](https://forums.developer.nvidia.com/t/ssd-inceptionv2-tensorrt-error/76534/3 "2019-06-21T06:13:59Z")

</div>

It works after setting the path of the plugin .

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 7:47pm UTC](https://forums.developer.nvidia.com/t/ssd-inceptionv2-tensorrt-error/76534/4 "2021-10-12T19:47:59Z")

</div>

Closed on October 12, 2021, 7:47pm UTC


