is_gpu_available
代码语言:javascript复制import tensorflow as tf
tf.test.is_gpu_available() //返回false,gpu不成功
安装cuda,cudnn 地址:https://developer.nvidia.com/cuda-toolkit-archive
tensorflow各版本对应的cuda查看链接:https://tensorflow.google.cn/install/source#linux
我安装的tensorflow2.4,cuda 11,cudnn 8安装完成后,提示 Could not load dynamic library ‘cusolver64_10.dll’ 解决办法:cusolver64_11.dll复制一份,改名为cusolver64_10.dll
如果还不行: 更新nvdia驱动,设置显卡为geforce显卡 https://blog.csdn.net/flana/article/details/104772614
出现以下提示为正常