1 查看tensorflow版本
1.1 进入对应的环境
打开终端、进入对应的虚拟环境,我的是tensorflow1140cuda100
conda activate tensorflow1140cuda100

1.2 打开Python
python

1.3 查看tensorflow版本、安装路径
import tensorflow as tf
tf.__version__
print(tf.__version__)
tf.__path__
print(tf.__path__)

2 查看cuda版本、查看cudnn版本
2.1 进入对应的环境
打开终端、进入对应的虚拟环境,我的是tensorflow1140cuda100
conda activate tensorflow1140cuda100

2.2 输入命令,查看cuda版本、cudnn版本
conda list | grep cuda

3 查看GPU可用性
3.1 进入对应的环境
打开终端、进入对应的虚拟环境,我的是tensorflow1140cuda100
conda activate tensorflow1140cuda100

3.2 打开Python
python

3.3 查看GPU可用性
import tensorflow as tf
print(tf.test.is_gpu_available())

4 查看cuda可用性
4.1 进入对应的环境
打开终端、进入对应的虚拟环境,我的是tensorflow1140cuda100
conda activate tensorflow1140cuda100

4.2 打开Python
python

4.3 查看cuda可用性
import tensorflow as tf
tf.test.is_built_with_cuda()
print(tf.test.is_built_with_cuda())

|