Hi,
I’ve tried deploying yolov3 using tensorflow on jetson nano. I need to implement ResizeNearest plugin on tensorrt. But I always get failure when building the network.
Here is my piece of code.
import graphsurgeon as gs
import pycuda.driver as cuda
import tf2onnx
import pycuda.autoinit
import tensorrt as trt
TRT_LOGGER = trt.Logger(trt.Logger.WARNING)
trt.init_libnvinfer_plugins(TRT_LOGGER, ‘’)
trt_runtime = trt.Runtime(TRT_LOGGER)
dynamic_graph = gs.DynamicGraph(frozen_graph)
trt_upsampled = gs.create_plugin_node(
name=“trt_upsampled”,
op=“ResizeNearest”,
scale=2.0)
namespace_plugin_map = {
“yolov3/yolov3_head/upsampled”: trt_upsampled
}
dynamic_graph.collapse_namespaces(namespace_plugin_map)
uff_model = uff.from_tensorflow(
dynamic_graph.as_graph_def(),
output_filename=model_path,
text=True)
with trt.Builder(TRT_LOGGER) as builder, builder.create_network() as network, trt.UffParser() as parser:
builder.max_workspace_size = 4 << 30
parser.register_input(“image_tensor”, [3, img_size, img_size])
parser.register_output(“yolov3/yolov3_head/upsampled”)
parser.parse(model_path, network)
Here is error from that piece of code.
[name: “trt_upsampled”
op: “ResizeNearest”
input: “yolov3/yolov3_head/Conv_7/LeakyRelu”
attr {
key: “scale_u_float”
value {
f: 2.0
}
}
]
Using output node trt_upsampled
Converting to UFF graph
Warning: No conversion function registered for layer: ResizeNearest yet.
Converting trt_upsampled as custom op: ResizeNearest
DEBUG [/usr/lib/python3.6/dist-packages/uff/converters/tensorflow/converter.py:96] Marking [‘trt_upsampled’] as outputs
No. nodes: 490
UFF Output written to /workspace/tensorrt/yolo_deployment/YOLOv3_TensorFlow/frozen_inference_graph.uff
UFF Text Output written to /workspace/tensorrt/yolo_deployment/YOLOv3_TensorFlow/frozen_inference_graph.pbtxt
Function not implemented
Segmentation fault (core dumped)
Thanks for your help.