admin 管理员组

文章数量: 887006

首先下载Anaconda3-4.2.0(最好使用这个版本,本人用4.3.0尝试不成功),官方下载链接,https://www.continuum.io/downloads#windows,需要VPN,选择下载64位的3.5的版本。

一路next,安装完毕后,点击Anaconda Prompt,输入如下命令行,

注意,我们这里建议安装tensorflow1.0.0,该版本相对稳定,当然会有一些SSE加速的警告,按下面的方式忽略即可,而1.0.1会报一些Opkernel的错误。

 

> conda create -n tensorflow python=3.5
> activate tensorflow
> pip install http://ci.tensorflow/view/Nightly/job/nightly-win/85/DEVICE=cpu,OS=windows/artifact/cmake_build/tf_python/dist/tensorflow-1.0.0rc2-cp35-cp35m-win_amd64.whl
> python
>>> import tensorflow as tf
>>> import os
>>> os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
>>> print('TensorFlow version: {0}'.format(tf.__version__))
TensorFlow version: 1.0.0-rc2
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
b'Hello, TensorFlow!'
>>> a = tf.constant(10)
>>> b = tf.constant(32)
>>> sess.run(a+b)
42
> deactivate tensorflow

 

 

 

TF_CPP_MIN_LOG_LEVEL:

·        0: all logs shown (that's the default setting)

·        1: filter out INFO logs

·        2: additionally filter out WARNING logs

·        3: additionally filter out ERROR logs.

 

 

 

 

reference:

https://www.tensorflow/install/install_windows

 

本文标签: 版本 TensorFlow cpu