报错截图 解决方法 该问题出现在Pytorch1.8.x版本,更新Pytorch至1.9.0即可解决。 卸载: pip uninstall torch 重新安装1.9.0版本: pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html 安装教程参考:Ubuntu18.04——私房整理安装NIVIDA驱动(11.4), CUDA11.2, cudnn8.2, TensorRT8.0, Pytorch1.9.0