TensorRT版本5.1.5的模块'tensorrt'没有属性'Logger'

我在推断Mobilenet v2 OD模型时尝试使用TensorRT。 Tensorflow版本为1.15.0,而Cuda版本为10.0。 NVIDIA TensorRT软件包为nv-tensorrt-repo-ubuntu1804-cuda10.0-trt5.1.5.0-ga-20190427_1-1_amd64.debTensorRT版本为5.1.5.0-1+cuda10.0。我已经尝试了所有github,NVIDIA和stackoverflow资源。

import tensorrt as trt
uff_model_path = "ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.uff"
engine_path = "ssd_mobilenet_v2_coco_2018_03_29/ssd_mobilenet_v2_bs_1.engine"
TRT_LOGGER = trt.Logger(trt.Logger.WARNING)
trt.init_libnvinfer_plugins(TRT_LOGGER,'')

错误日志:

AttributeError                            Traceback (most recent call last)
<ipython-input-6-651d430e77b0> in <module>()
      1 uff_model_path = "ssd_mobilenet_v2_coco_2018_03_29/frozen_inference_graph.uff"
      2 engine_path = "ssd_mobilenet_v2_coco_2018_03_29/ssd_mobilenet_v2_bs_1.engine"
----> 3 TRT_LOGGER = trt.Logger(trt.Logger.WARNING)
      4 trt.init_libnvinfer_plugins(TRT_LOGGER,'')
      5 

AttributeError: module 'tensorrt' has no attribute 'Logger'

请指出正确的方向。谢谢。

liuqiang5387 回答:TensorRT版本5.1.5的模块'tensorrt'没有属性'Logger'

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3094055.html

大家都在问