编辑:tensorflow-1.3.0-cp36-cp36m-linux_x86_64.whl
现在收到不同的警告。这些看起来更小?
2017-11-02 13:31:01.945114: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-11-02 13:31:01.945138: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-11-02 13:31:01.945154: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-11-02 13:31:01.945158: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-11-02 13:31:01.945166: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
我使用的是安装了 Python 3.6.3 的 Ubuntu 17.10。 我使用在 virtualenv 中安装了 tensorflow 轮文件
export TF_BINARY_URL=../Downloads/tensorflow-1.4.0-cp36-cp36m-manylinux1_x86_64.whl
pip3 install --upgrade $TF_BINARY_URL
然后运行下面的示例代码来验证安装,我收到一些警告
AI/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)
2017-11-02 12:32:13.054316: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
示例代码似乎在出现所有错误后都能运行。我应该忽略他们吗? 我是否下载了错误的车轮文件?
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
最佳答案
正如您在此处看到的,对于 python3.5 TF_Binary_URL 是
https://www.tensorflow.org/install/install_linux#the_url_of_the_tensorflow_python_package 这是张量版本 1.3,所以只需检查一下即可。
关于python - 安装 tensorflow : Python - Tensorflow Version Mismatch Warnings,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47075719/