python - 对于 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.deb
. TensorRT
版本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'
请指出正确的方向。谢谢你。
解决方案
推荐阅读
- python - 如何用另一个值替换数据框列中的空白?
- scala - 如何将 Scala HTTP4S 应用程序部署到 Heroku?
- java - 连接辅助功能服务时如何在 LogCat 中写入一些文本?
- flutter - 如何知道 Firebase 中的写入是在服务器上还是仅缓存?
- python - 找出所有安装在 spacy 中的语言模型
- sql - SQL datetime 转换为日期和时间
- node.js - 如何在 node.js 应用程序中使用 pnp-js 从共享点获取数据?
- tensorflow - 如何使用 tfa.layers.PoincareNormalize 实现 Poincaré 嵌入?
- python - AttributeError:“dict”对象没有属性“split”将逗号分隔的标签转换为列表
- r - 如何在 R 中更改图例标题和颜色