安装Tensorflow:Python - Tensorflow版本不匹配警告

时间:2017-11-02 12:47:20

标签: python machine-learning tensorflow

编辑: def find_string(b): if "a" in b or "c" in b or "d" in b or "f" in b: return "success" ## here I want to get the matching string 现在得到不同的警告。这些似乎更小?

tensorflow-1.3.0-cp36-cp36m-linux_x86_64.whl

我安装了Python 3.6.3的Ubuntu 17.10。 我使用

在virtualenv中安装了tensorflow wheel文件
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.

然后运行下面的示例代码来验证安装我得到了几个警告

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

2 个答案:

答案 0 :(得分:1)

正如你在这里看到的python3.5 TF_Binary_URL是

https://www.tensorflow.org/install/install_linux#the_url_of_the_tensorflow_python_package  这是张量版本1.3,所以只需检查一下。

答案 1 :(得分:1)

这些只是警告,如果你忽略它们,我认为你不会感到茫然。 There是Tensorflow回购中的问题主题。它们基本上意味着如果你在你的机器中从源代码构建TF,那么它可能会更快(仅在CPU方面。鉴于你没有提到GPU,我认为这就是你想要的。)

您可以执行此操作export TF_CPP_MIN_LOG_LEVEL=2

来阻止他们
相关问题