?安装好相匹配版本的CUDA和CUDNN后,根据pytorch官网指令安装好torch的相关包,输入python验证可用性,出现上述问题:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "D:\Anaconda3\envs\Complex-YOLOv4-Pytorch-master\lib\site-packages\torch\__init__.py", line 124, in <module>
raise err
OSError: [WinError 182] <no description> Error loading "D:\Anaconda3\envs\Complex-YOLOv4-Pytorch-master\lib\site-packages\torch\lib\caffe2_detectron_ops_gpu.dll" or one of its dependencies.
解决方法:
pip install intel-openmp
安装完成后,再次以以下方式验证:
python
import torch
print(torch.__version__)
print(torch.version.cuda)
print(torch.cuda.is_available())
print(torch.cuda.get_device_name())
最后我得出的结果是:
|