NVIDIA-AI-IOT / tf_trt_models

TensorFlow models accelerated with NVIDIA TensorRT
BSD 3-Clause "New" or "Revised" License
684 stars 244 forks source link

Error when loading trt_graph #30

Open xinli94 opened 5 years ago

xinli94 commented 5 years ago

Hi,

I use examples/detection/detection.ipynb to load official ssd_resnet_50_fpn_coco model, and convert to tensorrt graph. I am not sure why but I got this error:

ValueError                                Traceback (most recent call last)
<ipython-input-7-8056b93d1560> in <module>()
      3 tf_sess = tf.Session(config=tf_config)
      4 
----> 5 tf.import_graph_def(trt_graph, name='')
      6 
      7 tf_input = tf_sess.graph.get_tensor_by_name(input_names[0] + ':0')

/usr/local/lib/python2.7/dist-packages/tensorflow/python/util/deprecation.pyc in new_func(*args, **kwargs)
    452                 'in a future version' if date is None else ('after %s' % date),
    453                 instructions)
--> 454       return func(*args, **kwargs)
    455     return tf_decorator.make_decorator(func, new_func, 'deprecated',
    456                                        _add_deprecated_arg_notice_to_docstring(

/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/importer.pyc in import_graph_def(graph_def, input_map, return_elements, name, op_dict, producer_op_list)
    420       except errors.InvalidArgumentError as e:
    421         # Convert to ValueError for backwards compatibility.
--> 422         raise ValueError(str(e))
    423 
    424     # Create _DefinedFunctions for any imported functions.

ValueError: Node 'my_trt_op_0': Unknown input node 'my_trt_op_1:14' 

Could you help me with this?

Thanks, Xin

javierlaporta commented 5 years ago

Hi @xinli94 ! Could you solve the problem?

xinli94 commented 5 years ago

Hi @xinli94 ! Could you solve the problem?

Hi, Sorry that I haven't figure out how to fix it.