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怎么解决,因为大家出现的原 ...
随机推荐
- Kattis之旅——Number Sets
You start with a sequence of consecutive integers. You want to group them into sets. You are given t ...
- php的serialize()函数和unserialize()函数
适用情境:serialize()返回字符串,此字符串包含了表示value的字节流,可以存储于任何地方.这有利于存储或传递 PHP 的值,同时不丢失其类型和结构.比较有用的地方就是将数据存入数据库或记录 ...
- JDK常用命令(二)jstack
Dump Dump文件是进程的内存镜像.可以把程序的执行状态通过调试器保存到dump文件中.Dump文件一般用来给驱动程序编写人员调试驱动程序用的,在java中用来分析正在运行的程序在内存中的堆栈信息 ...
- .net下安装 ZooKeeper.Net
PM> Install-Package ZooKeeper.Net正在尝试解析依赖项“log4net (≥ 1.2.10)”.正在安装“log4net 1.2.10”.已成功安装“log4net ...
- 最菜的小鸟(mkdir -pv)
命令 mkdir -pv /usr/local/modules/{openjdk,nginx,tomcat,mariadb}/{manifests,files,templates,lib,tests, ...
- opencv学习之路(8)、基本图像运算——加减与或
一.图像加法 #include<opencv2/opencv.hpp> #include<iostream> using namespace cv; using namespa ...
- 尚硅谷面试第一季-15Mysql什么时候建索引
课堂重点: MySQL的官方定义: 索引的优势: 索引的劣势: 那些情况下需要建立索引: 那些情况下不要建立索引: 何为过滤性:例如在数据库字段里,手机号/身份证号这些字段是过滤性好的字段,而性别则是 ...
- ant____<project>标签的使用与含义
<project> 标记项目,例如: <project name = "java-ant project" default = "run"&g ...
- Python3 tkinter基础 Listbox for+insert 将list中元素导入listbox中
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...
- Python3 tkinter基础 Canvas coords 移动直线,itemconfig 设置矩形的颜色, delete 删除一条直线
Python : 3.7.0 OS : Ubuntu 18.04.1 LTS IDE : PyCharm 2018.2.4 Conda ...