1.检查显卡驱动的版本 我的电脑是GTX 960M 对应的是CUDA8.0版本
https://developer.nvidia.com/cuda-toolkit-archive
进入该网址进行下载
2.CUDA8.0 对应 cudnn6.0的版本
https://developer.nvidia.com/rdp/cudnn-archive
3.tensorflow 应该是对应1.4.0 或者 1.3.0 版本(注意此时的python应该为3.6)
win+R 输入cmd
pip install tensorflow-gpu==1.4.0
4.安装之后完成测试
win+R 输入cmd
输入python 进入python环境
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))