ERROR:Repeated layer name:_ResizeNearestNeighbor

I try convert Yolov3 to tensorRT,There is a layer which tensorRT is not supported,so I try to do by custom layer.
but there is error,I don’t konw how to fit it.

first,I convert .pb to .uff,like this,and unsupported layer(upsampling) as show.
this is I use commond convert-to-uff tensorflow --input-file yolov3.pb -l

622 ResizeNearestNeighbor:"up_sampling2d_1/ResizeNearestNearestNeighbor"
...
692 ResizeNearestNeighbor:"up_sampling2d_2/ResizeNearestNearestNeighbor"

but I ues isPlugin() to print layername,it become two layers

_ResizeNearestNeighbor
_ResizeNearestNeighbor
...
...
...
_ResizeNearestNeighbor
_ResizeNearestNeighbor

finally,I bulid engine,It show me

ERROR:Repeated layer name:_ResizeNearestNeighbor(layers must have distinct names)

error is clear,but I don’t kown how to solve it

sorry,I kown why is become two layer,
first _ResizeNearestNeighbor is call by is isPlugin()
second _ResizeNearestNeighbor is call by createplugin()

but the error is still exist

Hi,

I encountered the same issue here, it seems that compared to caffe parser, uff parser uses the operation name as the layer name instead of the origin layer name, so two _ResizeNearestNeighbor layer are here because yolov3 has two upsampling layers.

I tried several ways to solve this issue but none is working. I hope they can fix it and use the real layer name again, this is very inconvenience.

And I just found an solution given by nvidia in this post:

https://devtalk.nvidia.com/default/topic/1039415/?comment=5281197#

I’m not sure how to use the graphsurgeon but I’ll try.