windows下的tensorflow安装

1.文件下载

地址:

https://pan.baidu.com/disk/home#list/vmode=list&path=%2F%E5%85%AC%E5%BC%80%E6%96%87%E4%BB%B6%2F%E6%96%87%E4%BB%B6%2F2017%E5%B9%B46%E6%9C%88


2.tensorflow安装

首先要安装 Anaconda3-2.4.0-Windows-x86_64.exe ,然后点击 安装命令.bat
如果有报easy-install.pth错误,请先在命令窗口里执行
   conda remove setuptools

再次点击  安装命令.bat


3.其他:
tensorflow_gpu-1.2.0rc1-cp35-cp35m-win_amd64.whl 是包含GPU版本的tensorflow
tensorflow-1.2.0rc1-cp35-cp35m-win_amd64.whl 是不包GPU版本的

 安装命令.bat 的内容为
pip install --upgrade tensorflow-1.2.0rc1-cp35-cp35m-win_amd64.whl
pause
如果需要GPU版本的,把不包含GPU版本的名字给替换为带GPU版本的


测试是否安装成功

打开命令窗口


python
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> sess.run(hello)
'Hello, TensorFlow!'
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> sess.run(a+b)
42
>>>






官方地址 https://github.com/tensorflow/tensorflow

猜你喜欢

转载自blog.csdn.net/sk_U238/article/details/72843972