Windows下安装tensorflow步骤(转发)

原文地址: http://blog.csdn.net/chongtong/article/details/53905625

官方安装链接 
tensorflow 0.12.0开始支持Windows下安装了

环境要求:

安装过程:

安装python3.5

python.exe -m pip install --upgrade pip
  • 1
  • 1

安装tensorflow

  • gpu版本
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.0-cp35-cp35m-win_amd64.whl

 

  • cpu版本
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0-cp35-cp35m-win_amd64.whl

gpu版本tensorflow安装gpu支持包

安装cuda8.0

安装cudnn5.1

添加解压后的bin目录到PATH环境变量

测试tensorflow

$ python
...
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Hello, TensorFlow!
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> print(sess.run(a + b))
42
>>>
  • gpu使用情况查看
nvidia-smi -l # 实时返回GPU使用情况

原文链接

posted @ 2017-04-06 19:37  神游虚空  阅读(200)  评论(0)    收藏  举报