UffParser: Graph error: Cycle graph detected

hi ,I want to load a trained yolov3 tensorflow model use Tensorrt.
First, I converted a pb model to uff format.

convert-to-uff frozen_inference_graph.pb -p config.py

the config.py is:

import graphsurgeon as gs
import tensorflow as tf

Input = gs.create_node(“input”, op=“Placeholder”,dtype=tf.float32,shape=[1, 3, 416, 416])
upsample_layer = gs.create_plugin_node(name=“My_upsamply_layer”, op=“upsamply_layer_TRT”, dtype=tf.float32, scale=2)

namespace_plugin_map = {
“up_sampling2d_2/ResizeNearestNeighbor”: upsample_layer,
“up_sampling2d_1/ResizeNearestNeighbor”: upsample_layer,
“input_1”: Input
}

def preprocess(dynamic_graph):

dynamic_graph.collapse_namespaces(namespace_plugin_map)

when I use Tensorrt load the uff model is failde:
UffParser: Graph error: Cycle graph detected

1 Like