#  \[TensorRT\] ERROR: Could not register plugin creator: FlattenConcat\_TRT in namespace:

**URL:** <https://forums.developer.nvidia.com/t/tensorrt-error-could-not-register-plugin-creator-flattenconcat-trt-in-namespace/83631>\
**Category:** TensorRT\
**Created:** [October 21, 2019, 8:48pm UTC](https://forums.developer.nvidia.com/t/tensorrt-error-could-not-register-plugin-creator-flattenconcat-trt-in-namespace/83631 "2019-10-21T20:48:32Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![rjknight123](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@rjknight123](https://forums.developer.nvidia.com/u/rjknight123)\
**Post date:** [October 22, 2019, 2:17am UTC](https://forums.developer.nvidia.com/t/tensorrt-error-could-not-register-plugin-creator-flattenconcat-trt-in-namespace/83631/3 "2019-10-22T02:17:45Z")

</div>

Thanks for the quick reply.

I tried your suggestions and I no longer see the error. However, I’m not certain my compiled plugin is being run by the example code. I added some print statements to it to monitor the progress but I don’t see anything printed out when the sample runs.

If I just run the sample with no changes, except adding debug statements to the plugin code it seems to run, I see my debug statements but I also see the error message, so it seems like the plugin code is doing the right thing, maybe the error message is erroneous in this case (?)

I started using this sample code to help debug the error message.

```auto
import ctypes
import tensorrt as trt

# initialize
TRT_LOGGER = trt.Logger(trt.Logger.INFO)
trt.init_libnvinfer_plugins(TRT_LOGGER, '')
runtime = trt.Runtime(TRT_LOGGER)

PLUGIN_CREATORS = trt.get_plugin_registry().plugin_creator_list

for plugin_creator in PLUGIN_CREATORS:
    print(plugin_creator.name)

```

running that code I can see there is already a plugin named FlattenConcat\_TRT

```auto
(test-me) [builder@64eafe53afa3 uff_ssd]$ python test-plugin.py 
RnRes2Br1Br2c_TRT
RnRes2Br2bBr2c_TRT
SingleStepLSTMPlugin
FancyActivation
ResizeNearest
Split
InstanceNormalization
GridAnchor_TRT
NMS_TRT
Reorg_TRT
Region_TRT
Clip_TRT
LReLU_TRT
PriorBox_TRT
Normalize_TRT
RPROI_TRT
BatchedNMS_TRT
FlattenConcat_TRT

```

and if I add the following to the test script just before creating the TRT\_LOGGER

```auto
ctypes.CDLL("build/libflattenconcat.so")

```

I see the error, and I also see the print statements in my compiled plugin

```auto
(test-me) [builder@64eafe53afa3 uff_ssd]$ python test-plugin.py 
enter FlattenConcatPluginCreator --> My debug printf
enter getPluginNamespace --> My debug printf
[TensorRT] ERROR: Could not register plugin creator: FlattenConcat_TRT in namespace:

```

I decided to try renaming the plugin and that seemed to work.

in plugin/FlattenConcat.cpp change the name of the plugin to \_FlattenConcat\_TRT

```auto
namespace
{
const char* FLATTENCONCAT_PLUGIN_VERSION{"1"};
const char* FLATTENCONCAT_PLUGIN_NAME{"FlattenConcat_TRT"}; --> change to _FlattenConcat_TRT
}

```

and in utils/model.py also change the plugin op to \_FlattenConcat\_TRT and add the axis/ignoreBatch

```auto
concat_box_loc = gs.create_plugin_node(
        "concat_box_loc",
        op="_FlattenConcat_TRT",
        dtype=tf.float32,
        axis=1,
        ignoreBatch=0
    )
    concat_box_conf = gs.create_plugin_node(
        "concat_box_conf",
        op="_FlattenConcat_TRT",
        dtype=tf.float32,
        axis=1,
        ignoreBatch=0
    )

```

I no longer see the error and can see the debug statements I added to the plugin code.

I’m now wondering if renaming the plugin a valid solution, or should be able to override the existing FlattenConcat\_TRT plugin and not see the ERROR message?

Thank you.

---

_[View the full topic](https://forums.developer.nvidia.com/t/tensorrt-error-could-not-register-plugin-creator-flattenconcat-trt-in-namespace/83631)._
