解决“测试TensorRT安装过程中download_pgms.py报错”问题

在Ubuntu18.04上安装TensorRT过程中遇到download_pgms.py脚本错误,包括函数命名错误和网络连接问题。解决方法包括修改函数名和多次尝试以克服网络不稳定导致的下载失败。通过这些步骤,最终成功验证了TensorRT的安装。
摘要由CSDN通过智能技术生成

问题描述

尝试使用TensorRT对yolov5模型推理加速,首先进行安装,参考博客已经写的很详细了:Ubuntu1804+CUDA10.0安装TensorRT7

对了,在更改环境配置的时候还添加了CUDA和cuDNN:

vim ~/.bashrc

# tensorrt cuda and cudnn
export CUDA_INSTALL_DIR=/usr/local/cuda
export CUDNN_INSTALL_DIR=/usr/local/cuda


source ~/.bashrc

但是在测试TensorRT是否安装成功时,需要下载MNIST数据集,运行download_pgms.py会有两个报错:

1.函数报错

download_pgms.py:12: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
  raw_buf = np.fromstring(buffer, dtype=np.uint8)
download_pgms.py:23: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead
  raw_buf = np.fromstri
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值