GPU
【参考:Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll_Hildasu的博客-CSDN博客】
CUDA
CUDA
在小娜搜索界面输入 NVIDIA Control Panel 回车
https://developer.nvidia.com/cuda-toolkit-archive
下载11.2版本
压缩版zip需要自己配置环境,exe应用程序不用
验证
nvcc -V
tensorflow-GPU
https://tensorflow.google.cn/install/source_windows#gpu
官网严格对应版本下载
pip install tensorflow-gpu==2.6.0 -i https://pypi.douban.com/simple --user
cuDNN
下载cuDNN
https://developer.nvidia.com/rdp/cudnn-archive
下载后可以得到一个压缩包,解压后可以看到三个文件夹。我们要做的就是
[En]
After you download it, you can get a compressed package, and after decompressing it, you can see three folders. All we have to do is
把这三个文件夹中的内容 拷贝到 CUDA 安装目录下面所对应的三个文件夹中
; 检验
cmd里面输入(不要去编译器里面)
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 9882589357684449368
, name: "/device:GPU:0"
device_type: "GPU"
memory_limit: 2918357401
locality {
bus_id: 1
links {
}
}
incarnation: 14082564136975034657
physical_device_desc: "device: 0, name: GeForce GTX 1050, pci bus id: 0000:01:00.0, compute capability: 6.1"
]
问题
问题
判断问题1
(已经安装)在CMD中输入
python
import tensorflow
输出
ImportError: DLL load failed
或
Could not load dynamic library ‘cudart64_***.dll’
为cuda版本问题
作者:Excurs1ons https://www.bilibili.com/read/cv5611447/ 出处:bilibili
Original: https://blog.csdn.net/Jruo911/article/details/123466119
Author: myaijarvis
Title: 【Tensorflow】安装
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/511206/
转载文章受原作者版权保护。转载请注明原作者出处!