没有名为“uff”的模块

2024-06-12 05:23:08 发布

您现在位置:Python中文网/ 问答频道 /正文

目标: 将tensorflow.pb模型转换为tensorrt

系统规格: 乌本杜18.04 Cuda 10.0 TensorRT 5.1

甚至安装了sudo apt-get install uff-converter-tf

尝试在Python中导入uff时出错:

ModuleNotFoundError: No module named 'uff'


Tags: install模型目标gettensorflow系统sudoapt
1条回答
网友
1楼 · 发布于 2024-06-12 05:23:08

安装uff-converter-tf是不够的,您需要安装Python UFF轮子才能使用它Here您将找到完整的安装指南

如果使用Python 2.7:

pip2 install tensorrt-*-cp27-none-linux_x86_64.whl

如果使用Python 3.x:

pip3 install tensorrt-*-cp3x-none-linux_x86_64.whl

您将找到这些控制盘和其他TensorRT二进制文件,它们是解包TensorRT-${version}.${os}.${arch}-gnu.${cuda}.${cudnn}.tar.gz产生的

和往常一样,最好安装在虚拟环境中

相关问题 更多 >