Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
解决方法:
如果安装的是GPU版本
如果你有一个GPU,你不应该关心AVX的支持,因为大多数昂贵的操作将被分派到一个GPU设备上(除非明确地设置)。在这种情况下,您可以简单地忽略此警告:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = ''
如果安装的是CPU版本(pip install tensorflow)
1.在代码中加入如下代码,忽略警告:
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = ''
2.编译TensorFlow源码
如果您没有GPU并且希望尽可能多地利用CPU,那么如果您的CPU支持AVX,AVX2和FMA,则应该从针对CPU优化的源构建tensorflow。在这个问题中已经讨论过这个问题,也是这个GitHub问题。 Tensorflow使用称为bazel的ad-hoc构建系统,构建它并不是那么简单,但肯定是可行的。在此之后,不仅警告消失,tensorflow性能也应该改善。
参考:
https://blog.csdn.net/hq86937375/article/details/79696023
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA的更多相关文章
- 解决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 ...
- 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 ...
- 警告: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 FMA
解决方法:import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'输入1:显示所有信息 2:只显示warning和erro ...
- I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA 问题
临时解决版本进入python后只需下面命令 import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
- 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 ...
- 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扩展,但是 ...
- 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. 如果是初学者 或者 没有太大计算速度的需求,在开头加上这两行 ...
- 报错:Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
1.问题 写了一个简单的单层神经网络跑mnist手写数字集,结果每次fit都会出现dead kernel 很多dead kernel首先不要急着去网上搜dead kernel怎么解决,因为大家出现的原 ...
随机推荐
- C++中static_cast和dynamic_cast强制类型转换
在C++标准中,提供了关于类型层次转换中的两个关键字static_cast和dynamic_cast. 一.static_cast关键字(编译时类型检查) 用法:static_cast < ty ...
- 2018.1.7java转型
从昨天的组合和继承开始,我在分析二者的区别,到后面的向上转型,再到hashcode和equals还有==的区别,感觉基础还很不好,也许,目前应该从面向对象开始复习,把暂时笔试宝典放一下. 回忆一下今天 ...
- if语法
语法一: if 条件: 条件成立时执行的子代码块 age_of_girl=31 if age_of_girl > 30: print('阿姨好') 语法二:if + else if 条件 ...
- php的serialize()函数和unserialize()函数
适用情境:serialize()返回字符串,此字符串包含了表示value的字节流,可以存储于任何地方.这有利于存储或传递 PHP 的值,同时不丢失其类型和结构.比较有用的地方就是将数据存入数据库或记录 ...
- git小技巧--如何从其他分支merge个别文件或文件夹
在实际工作中,一个大型的项目或版本迭代可能不是一次上线,可能会分好几次上线,这时候就会涉及创建多个分支,进行分别开发. 创建分支 功能分为2个分支,分别为A.B. A上面有个列表页功能 B上面有个详情 ...
- 关于centos7字体缺失导致项目验证码丢失报错500问题
这个问题是这样的,迁移架构的时候项目验证码刷不出来, 页面报错500, 就像下面那样. tomcat报错是数组越界, 看下面 最诡异的是, 开发那边再三确定代码里面没有问题, 于是我试了一下把war包 ...
- replace 将逗号替换~
var reg = new RegExp(",","g"); //"g"表示全局替换var aa="qq,ww";aa= ...
- 将svn下载的项目转化为java project
1.选中项目,右键点击弹出窗口,点击窗口中的[Properties],弹出[Properties for test]窗口, 如下: 2.点击窗口中的[Project Facets],右边显示[Conv ...
- java Swing小知识点
private JTextArea jta=new JTextArea(1,2); private ScrollPane sp=new ScrollPane(); private JPasswordF ...
- bzoj2152: 聪聪可可 点分治
链接 https://www.lydsy.com/JudgeOnline/problem.php?id=2152 luogu爆搜都能过,总时间超过100ms就是写错了 思路 直接mod上面跑点分治就行 ...