问题描述
尝试使用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