1.  tensorflow的网站我是打不开的,不知道为什么,需要搬个梯子去看看.
域名解析也正常,只是无法访问而已。

点击(此处)折叠或打开

  1. ping -c4 tensorflow.org
  2. PING tensorflow.org (216.239.32.21) 56(84) bytes of data.

  3. --- tensorflow.org ping statistics ---
  4. 4 packets transmitted, 0 received, 100% packet loss, time 3056ms

2. 好在还有github ->

点击(此处)折叠或打开

  1. https://github.com/tensorflow/tensorflow
首先创建virtual - env.

点击(此处)折叠或打开

  1. python3.5 -m venv TensorEnv
  2. cd TensorEnv
  3. mkdir -p TensorFLow
  4. source bin/activate
下载文件

点击(此处)折叠或打开

  1. wget "https://ci.tensorflow.org/view/tf-nightly/job/tf-nightly-linux/TF_BUILD_IS_OPT=OPT,TF_BUILD_IS_PIP=PIP,TF_BUILD_PYTHON_VERSION=PYTHON3.5,label=cpu-slave/lastSuccessfulBuild/artifact/pip_test/whl/tf_nightly-1.head-cp35-cp35m-linux_x86_64.whl"
然后使用pip完成安装:

点击(此处)折叠或打开

  1. pip3 install tf_nightly-1.head-cp35-cp35m-linux_x86_64.whl
有如下报错:

点击(此处)折叠或打开

  1. error: invalid command 'bdist_wheel'
  2.   
  3.   ----------------------------------------
  4.   Failed building wheel for gast
需要升级setuptools.

点击(此处)折叠或打开

  1. pip3 install setuptools --upgrade
然后再次安装

点击(此处)折叠或打开

  1. pip3 install tf_nightly-1.head-cp35-cp35m-linux_x86_64.whl
完成后来实验下:

点击(此处)折叠或打开

  1. >>> import tensorflow as tf
  2. >>> hello = tf.constant('Hello,
  3. >>> sess = tf.Session()
  4. 2018-02-21 15:06:08.405164: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
TensorFlow编译的时候没有支持CPU的某些指令。
参看这个:
https://stackoverflow.com/questions/47068709/your-cpu-supports-instructions-that-this-tensorflow-binary-was-not-compiled-to-u

10-12 12:58
查看更多