Tensorflow 运行警告提示 Your CPU supports instructions that this TensorFlow binary was not compiled to use
由于现在神经网络这个东西比较火,准确的说是深度学习这个东西比较火,我们实验室准备靠这个东西发几个CCF A类的文章,虽然我不太懂这东西,兴趣也一般都是毕竟要跟随主流的,于是今天安装起了 Tensorflow 这个深度学习的框架。
安装好以后运行一个Demo ,如下:
import tensorflow as tf
a=tf.constant(2)
b=tf.constant(20) with tf.Session() as sess:
print(sess.run(a*b))
运行结果如下:
2018-05-03 19:57:44.151803: 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
2018-05-03 19:57:44.251905: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:892] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2018-05-03 19:57:44.252195: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Found device 0 with properties:
name: GeForce GTX 1050 Ti major: 6 minor: 1 memoryClockRate(GHz): 1.62
pciBusID: 0000:01:00.0
totalMemory: 3.95GiB freeMemory: 3.65GiB
2018-05-03 19:57:44.252228: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1120] Creating TensorFlow device (/device:GPU:0) -> (device: 0, name: GeForce GTX 1050 Ti, pci bus id: 0000:01:00.0, compute capability: 6.1)
40
这么一堆东西,一块就知道是没有啥用的警告,当然这是要把那个结果排除的,本打算忽略,不过这么一条警告我觉得我还是应该研究一下,如下:
Your CPU supports instructions that this TensorFlow binary was not compiled to use
这个警告是说我这个Tensorflow 不能支持几种CPU矢量运算的指令码,这东西看起来虽然是然并卵,但是总之是要人看着不太舒服,于是我上网找了找解法,发现大部分人是把警告直接屏蔽,方法如下:
1.
开头输入如下:
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = ''
不过这个法子总是有些不完美,于是继续研究,得到第二个法子:
2. 进 tensorflow 官网,从源码安装
这个法子十分彻底,不过难度太大,这里不进行考虑。
3. 第三个方法,可能是我找到的比较靠谱的一个法子:
参考:https://blog.csdn.net/PJ7410/article/details/78886048
这里面说这个东西是要使你的Tensorflow 支持 SSE4.1 SSE4.2 AVX AVX2 FMA 指令,并给出了一个外国网址:
TensorFlow binaries supporting AVX, FMA, SSE etc.
由于我的个人电脑的配置,我选择下面的安装包:
下载到电脑上后,执行:
sudo pip install --ignore-installed --upgrade tensorflow-1.6.0-cp27-cp27mu-linux_x86_64.whl
然后就是漫长的等待,此时此刻我也是等待中呀,稍后便知是否可行。
经过漫长的等待,大致花了一个小时左右的时间,终于搞定,所有的警告消息都没有了,此法可行。
搞定
Tensorflow 运行警告提示 Your CPU supports instructions that this TensorFlow binary was not compiled to use的更多相关文章
- 警告:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
加入 import os os.environ[' demo: import os os.environ[' import tensorflow as tf tf.enable_eager_execu ...
- Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
pycharm运行TensorFlow警告:Your CPU supports instructions that this TensorFlow binary was not compiled to ...
- 解决tensorflow的"Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA Using TensorFlow backend."警告问题
问题描述 程序开始运行的时候报出警告:I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructio ...
- 运行TensorFlow出现Your CPU supports instructions that this TensorFlow binary was not compiled to use: AV
原因: import os #在顶头位置加上 os.environ["TF_CPP_MIN_LOG_LEVEL"]='1' # '1'表示默认的显示等级,运行时显示所有信息 os. ...
- 报错解决——Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
在导入tensorflow后,进行运算时,出现了报错Your CPU supports instructions that this TensorFlow binary was not compile ...
- 2019-09-16 16:42:03.621946: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA Traceback (most recent cal
-- ::] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA ...
- I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
问题: 安装TensorFlow(CPU版本),使用pip install tensorflow安装,安装一切顺利,但是在跑一个简单的程序时,遇到如下情况: 大概意思是:你的CPU支持AVX扩展,但是 ...
- Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
解决方法: 如果安装的是GPU版本 如果你有一个GPU,你不应该关心AVX的支持,因为大多数昂贵的操作将被分派到一个GPU设备上(除非明确地设置).在这种情况下,您可以简单地忽略此警告: import ...
- I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
遇到了这个问题,意思是你的 CPU 支持AVX AVX2 (可以加速CPU计算),但你安装的 TensorFlow 版本不支持 解决:1. 如果是初学者 或者 没有太大计算速度的需求,在开头加上这两行 ...
随机推荐
- TCP/IP的相关协议
- 解题报告:hdu1284 钱币兑换问题
2017-09-03 19:03:06 writer:pprp 状态定义: dp[i][j] = x 代表的是 用前i 中硬币构造 j 美分的方法数目: 初始化: dp[0][0] = 1 状态转移: ...
- [转]3个著名加密算法(MD5、RSA、DES)的解析
MD5的全称是Message-Digest Algorithm 5,在90年代初由MIT的计算机科学实验室和RSA Data Security Inc发明,经MD2.MD3和MD4发展而来. ...
- idea 快捷键及使用技巧
IDEA中经常使用的快捷键: Ctrl+Shift + Enter 语句完成 可以快速在行末添加分号,或添加大括号{} Ctrl+Shift + F 全文查找 需要把搜狗打字的快捷键关掉 Ctrl+A ...
- Extjs 分页多选的实现
Extjs 版本 6.X 单页面的多选,没有任何问题. 直接使用 Grid的配置项进行绑定即可获取: xtype: 'grid', bind: { selection: '{checkedRecord ...
- Java Collections Framework 之 RandomAccess接口
在研究Collections类的排序算法时候,看到这样的代码 : public static <T> int binarySearch(List<? extends Comparab ...
- UOJ34 多项式乘法(NTT)
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/ ...
- 使用Python操作memcache
Python连接memcached的库有很多,处于简单以及高效的原则,最终选择了pymemcache, 优点 完全实现了memcached text协议 对于send/recv操作可以配置timeou ...
- play的过滤类怎么实现继承问题
原文: Example: public class Secure extends Controller { @Before static void checkAuthenti ...
- poj1113凸包
就是求凸包的周长加以l为半径的圆周长,证明略 由于之前写过叉积,所以graham扫描算法不是很难理解 #include<map> #include<set> #include& ...