win10 安装 tensorflow-gpu

CUDA:

https://developer.nvidia.com/cuda-90-download-archive

CUDNN:

https://developer.nvidia.com/rdp/cudnn-archive

tensorflow:

1
pip install tensorflow-gpu --upgrade

测试:

1
2
3
4
5
6
7
8
9
10
11
import tensorflow as tf

a = tf.test.is_built_with_cuda() # 判断CUDA是否可以用

b = tf.test.is_gpu_available(
cuda_only=False,
min_cuda_compute_capability=None
) # 判断GPU是否可以用

print(a)
print(b)