1.首先下载cuda 8.0
https://developer.nvidia.com/cuda-downloads
安装默认一路走到通,关闭360及杀毒软件。完成后打开cmd,
nvcc -V
查看cuda版本
2.下载cudnn 6.0
https://developer.nvidia.com/rdp/cudnn-download
3.解压之后放在把解压之后cuda文件夹中3个文件夹覆盖到你安装cuda时候的文件夹cuda/v8.0/中
pip install tensorflow-gpu==1.4.0
pip install keras
打开conda的Python命令窗口,敲入:
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))