Tensorflow调用GPU失败原因查找

问题查找

打开镜像,进入python,导入tensorflow,查看提示信息
在这里插入图片描述
这里出现警告 cudart64_101.dll not found

解决办法

找到你安装的cuda目录,进入bin文件找到cudart64_*.dll文件,可能你的文件是cudart64_102.dll,只是你只需要把这个文件改为上面提示找不到的文件名即可。
在这里插入图片描述

完成

查看可用设备

from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())

在这里插入图片描述
这时我们可以看到自己的GPU信息,说明已经成功了。

猜你喜欢

转载自blog.csdn.net/qq_43802454/article/details/121653611
今日推荐