【问题标题】:TensorFlow warnings with Python使用 Python 的 TensorFlow 警告
【发布时间】:2018-05-26 12:56:44
【问题描述】:

在Mac osX 10.13.2上运行,安装了tensorflow的cpu版本

  1. 我安装了 tensorflow v1.4 并且收到了这个不匹配警告。幸运的是它执行但我不知道如何获得与 Python 3.6 匹配的 tensorflow ??

  2. 我进行了测试以验证我的安装,这也有点奇怪。打印命令看起来并没有真正执行。有b'...' (见下文)

  3. 关于我的 cpu 支持 tensorflow 二进制不支持的指令的一些说明。

我是新手,谢谢..

在 MacBook 的终端窗口中测试 tensorflow:

Last login: Tue Dec 12 11:36:14 on ttys000
fredericks-MBP:~ bravo$ python
Python 3.6.2 |Anaconda custom (64-bit)| (default, Sep 21 2017, 18:29:43) 
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import tensorflow as tf
/anaconda3/lib/python3.6/importlib/_bootstrap.py:205: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)

========================== 验证安装:

>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
2017-12-12 11:48:30.408157: 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
>>> 
>>> print(sess.run(hello))
b'Hello, TensorFlow!'
>>> 

【问题讨论】:

标签: python macos python-3.x tensorflow anaconda


【解决方案1】:

关于您的第 2 点的 b'...' 不是问题。您得到的答案是 python 字节文字而不是字符串,因此它前面的 b 。见What does the 'b' character do in front of a string literal?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-08-07
    • 1970-01-01
    • 2021-12-27
    • 2017-07-16
    • 1970-01-01
    • 2021-01-31
    • 2020-07-22
    • 1970-01-01
    相关资源
    最近更新 更多