最新版的tensorflow2.1默认安装cpu和gpu两个版本,gpu不能运行时退回到cpu版本。运行相关代码时显示错误:
-
Could
not load dynamic library
'cudart64_101.dll'; dlerror: cudart64_101.dll
not found
-
Ignore above cudart dlerror
if you do
not have a GPU
set up on your machine.
不能运行gpu版本,简直令人抓狂。
先来排查错误,显示“cudart64_101.dll not found”,那是因为我安装的cuda为10.0版本的,“cudart64_101.dll”是cuda10.1这个版本中才含有的(cuda10.2貌似也没有)。
因此我们需要手动将“cudart64_101.dll”添加到“C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\bin”中去。
另附cudart64_101.dll链接https://cn.dll-files.com/cudart64_101.dll.html
文章知识点与官方知识档案匹配,可进一步学习相关知识
Python入门技能树首页概览
427833 人正在系统学习中